Check if setup tab is visible

This commit is contained in:
M66B
2020-04-11 09:35:11 +02:00
parent 5ac07d0e03
commit 8f95ab649f
2 changed files with 9 additions and 2 deletions

View File

@@ -352,9 +352,12 @@ public class FragmentSetup extends FragmentBase {
@Override
public boolean onBackPressed() {
if (getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.STARTED))
if (getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.STARTED) &&
((FragmentOptions) getParentFragment()).isVisible(0)) {
onExit();
return true;
return true;
} else
return false;
}
});