From 881ad4fd4706ac985b576216d23d7d48df31d39a Mon Sep 17 00:00:00 2001 From: Samuel Holland Date: Thu, 24 Aug 2017 01:47:12 -0500 Subject: [PATCH] ConfigActivity: Fix condition for inserting back stack entries Fixes saved editor state on rotation (removing and recreating the editor discarded changes). Signed-off-by: Jason A. Donenfeld --- app/src/main/java/com/wireguard/android/ConfigActivity.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/wireguard/android/ConfigActivity.java b/app/src/main/java/com/wireguard/android/ConfigActivity.java index 4f3a85ef..3293690d 100644 --- a/app/src/main/java/com/wireguard/android/ConfigActivity.java +++ b/app/src/main/java/com/wireguard/android/ConfigActivity.java @@ -63,7 +63,8 @@ public class ConfigActivity extends BaseConfigActivity { } } // Now build up intermediate entries in the back stack as necessary. - if (TAG_EDIT.equals(tag) && !TAG_DETAIL.equals(visibleFragmentTag)) + if (TAG_EDIT.equals(tag) && !TAG_EDIT.equals(visibleFragmentTag) && + !TAG_DETAIL.equals(visibleFragmentTag)) moveToFragment(config, TAG_DETAIL); // Finally, set the main container's content to the new top-level fragment. if (tag == null) {