Lifecycle fixes

This commit is contained in:
M66B 2022-04-19 08:23:24 +02:00
parent 5c3e86cc9a
commit b32cd2ac62
1 changed files with 4 additions and 0 deletions

View File

@ -1892,6 +1892,8 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
@Override
public void run() {
try {
if (!getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.STARTED))
return;
for (Integer pos : changed)
adapter.notifyItemChanged(pos);
} catch (Throwable ex) {
@ -1938,6 +1940,8 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
@Override
public void run() {
try {
if (!getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.STARTED))
return;
adapter.notifyItemChanged(p);
} catch (Throwable ex) {
Log.e(ex);