summaryrefslogtreecommitdiffhomepage
path: root/app/src/main/java/com
diff options
context:
space:
mode:
authorSamuel Holland <samuel@sholland.org>2017-08-10 01:10:15 -0500
committerSamuel Holland <samuel@sholland.org>2017-08-10 01:10:15 -0500
commit41beac9e0e952190bb278f91b1f542b15d46e826 (patch)
treebb3901ace49073cdb0792c3ba0932454cbfc8dce /app/src/main/java/com
parentce7ebae1fba536ada4d15e6cf6f5854e52a7a312 (diff)
ProfileList: Fix state tracking
Diffstat (limited to 'app/src/main/java/com')
-rw-r--r--app/src/main/java/com/wireguard/android/ProfileListActivity.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/src/main/java/com/wireguard/android/ProfileListActivity.java b/app/src/main/java/com/wireguard/android/ProfileListActivity.java
index 1e344060..31f845c2 100644
--- a/app/src/main/java/com/wireguard/android/ProfileListActivity.java
+++ b/app/src/main/java/com/wireguard/android/ProfileListActivity.java
@@ -58,8 +58,10 @@ public class ProfileListActivity extends ProfileActivity {
}
public void onProfileSelected(String profile) {
- setIsEditing(false);
if (isSplitLayout) {
+ if (isEditing())
+ getFragmentManager().popBackStack();
+ setIsEditing(false);
updateLayout(profile);
setCurrentProfile(profile);
} else if (profile != null) {
@@ -85,8 +87,6 @@ public class ProfileListActivity extends ProfileActivity {
public void updateLayout(String profile) {
final Fragment fragment = getFragmentManager().findFragmentById(R.id.fragment_container);
- if (isEditing() && profile == null)
- throw new IllegalStateException();
if (isEditing()) {
if (fragment instanceof ProfileEditFragment) {
final ProfileEditFragment editFragment = (ProfileEditFragment) fragment;