summaryrefslogtreecommitdiffhomepage
path: root/app/src/main
diff options
context:
space:
mode:
authorSamuel Holland <samuel@sholland.org>2017-08-24 01:47:12 -0500
committerSamuel Holland <samuel@sholland.org>2017-08-24 01:47:12 -0500
commita9244e371447ecb20a4fcc801015d6408a1e1693 (patch)
tree7691500aff9c9e7568bed7a2b10b3a7e04e9644c /app/src/main
parent61e67c3aaa03602fba762f057a208b3c02536261 (diff)
ConfigActivity: Fix condition for inserting back stack entries
Fixes saved editor state on rotation (removing and recreating the editor discarded changes).
Diffstat (limited to 'app/src/main')
-rw-r--r--app/src/main/java/com/wireguard/android/ConfigActivity.java3
1 files changed, 2 insertions, 1 deletions
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) {