Prevent multiple finishes

pull/180/head
M66B 4 years ago
parent ac69307b0e
commit 4961b0d8f3

@ -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…
Cancel
Save