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))