summaryrefslogtreecommitdiffhomepage
path: root/app/src/main/java/com
diff options
context:
space:
mode:
authorHarsh Shandilya <me@msfjarvis.dev>2020-02-25 09:31:53 +0530
committerHarsh Shandilya <me@msfjarvis.dev>2020-02-25 14:23:28 +0530
commitb3090e277a343d5300a396ce6c65e474e28f9704 (patch)
tree048051635feb5d21b2c7236bf28f4ae0d9840368 /app/src/main/java/com
parent0b45151a3d8e18f3404e30931eb7042d34dd1d58 (diff)
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>
Diffstat (limited to 'app/src/main/java/com')
-rw-r--r--app/src/main/java/com/wireguard/android/activity/MainActivity.java1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/src/main/java/com/wireguard/android/activity/MainActivity.java b/app/src/main/java/com/wireguard/android/activity/MainActivity.java
index c19be608..c4f61151 100644
--- a/app/src/main/java/com/wireguard/android/activity/MainActivity.java
+++ b/app/src/main/java/com/wireguard/android/activity/MainActivity.java
@@ -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.
if (!isTwoPaneLayout && backStackEntries == 1) {
+ getSupportFragmentManager().popBackStack();
setSelectedTunnel(null);
return;
}