mirror of
https://github.com/M66B/FairEmail.git
synced 2025-01-01 12:44:42 +00:00
Prevent multiple finishes
This commit is contained in:
parent
ac69307b0e
commit
4961b0d8f3
1 changed files with 5 additions and 0 deletions
|
@ -67,6 +67,7 @@ public class FragmentBase extends Fragment {
|
|||
private String title = null;
|
||||
private String subtitle = " ";
|
||||
private boolean finish = false;
|
||||
private boolean finished = false;
|
||||
|
||||
private long message = -1;
|
||||
private long attachment = -1;
|
||||
|
@ -117,6 +118,10 @@ public class FragmentBase extends Fragment {
|
|||
}
|
||||
|
||||
protected void finish() {
|
||||
if (finished)
|
||||
return;
|
||||
finished = true;
|
||||
|
||||
if (getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.STARTED))
|
||||
getParentFragmentManager().popBackStack();
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue