From b3090e277a343d5300a396ce6c65e474e28f9704 Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Tue, 25 Feb 2020 09:31:53 +0530 Subject: [PATCH] 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 --- .../main/java/com/wireguard/android/activity/MainActivity.java | 1 + 1 file changed, 1 insertion(+) 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; }