Prevent crash

pull/147/head
M66B 6 years ago
parent 0f0a8817ee
commit 6dca04cd87

@ -421,8 +421,12 @@ public class FragmentMessages extends FragmentEx {
} else {
predicate.clearAccount();
fabMore.hide();
if (getViewLifecycleOwner().getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.RESUMED))
loadMessages();
try {
if (getViewLifecycleOwner().getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.RESUMED))
loadMessages();
} catch (IllegalStateException ex) {
Log.w(Helper.TAG, ex + "\n" + Log.getStackTraceString(ex));
}
swipeRefresh.setEnabled(true);
}
}

Loading…
Cancel
Save