MainActivity: Fix backstack bug exposed by fragment 1.2.2

We've been relying on implicit backstack changes to handle removing the detail fragment for a while which is now gone so let's do this properly like we should

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
This commit is contained in:
Harsh Shandilya 2020-02-25 09:31:53 +05:30
parent 0b45151a3d
commit b3090e277a

View File

@ -50,6 +50,7 @@ public class MainActivity extends BaseActivity
} }
// Deselect the current tunnel on navigating back from the detail pane to the one-pane list. // Deselect the current tunnel on navigating back from the detail pane to the one-pane list.
if (!isTwoPaneLayout && backStackEntries == 1) { if (!isTwoPaneLayout && backStackEntries == 1) {
getSupportFragmentManager().popBackStack();
setSelectedTunnel(null); setSelectedTunnel(null);
return; return;
} }