From 488fac7e09efd9da978ae95c8ccb0aaa12119b9e Mon Sep 17 00:00:00 2001 From: M66B Date: Tue, 14 Jul 2020 21:30:08 +0200 Subject: [PATCH] Prevent crash --- app/src/main/java/eu/faircode/email/FragmentMessages.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/eu/faircode/email/FragmentMessages.java b/app/src/main/java/eu/faircode/email/FragmentMessages.java index 91820343ee..308b4e82f2 100644 --- a/app/src/main/java/eu/faircode/email/FragmentMessages.java +++ b/app/src/main/java/eu/faircode/email/FragmentMessages.java @@ -3710,7 +3710,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences. } private void onMenuFolders(long account) { - if (isDetached()) + if (!isAdded()) return; if (getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.STARTED))