mirror of
https://github.com/M66B/FairEmail.git
synced 2025-12-31 10:01:22 +01:00
Fixed lifecycle crashes
This commit is contained in:
@@ -33,6 +33,7 @@ import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.lifecycle.Lifecycle;
|
||||
import androidx.lifecycle.Observer;
|
||||
|
||||
public class FragmentFolder extends FragmentEx {
|
||||
@@ -148,7 +149,8 @@ public class FragmentFolder extends FragmentEx {
|
||||
@Override
|
||||
public void onChanged(@Nullable EntityFolder folder) {
|
||||
if (folder == null) {
|
||||
getFragmentManager().popBackStack();
|
||||
if (getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.RESUMED))
|
||||
getFragmentManager().popBackStack();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user