1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2025-02-23 14:41:08 +00:00

Prevent crash

This commit is contained in:
M66B 2018-12-10 14:56:44 +01:00
parent 0f0a8817ee
commit 6dca04cd87

View file

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