diff --git a/src/main/java/com/nutomic/syncthingandroid/fragments/NodeSettingsFragment.java b/src/main/java/com/nutomic/syncthingandroid/fragments/NodeSettingsFragment.java index f3992c8d..d4031fbb 100644 --- a/src/main/java/com/nutomic/syncthingandroid/fragments/NodeSettingsFragment.java +++ b/src/main/java/com/nutomic/syncthingandroid/fragments/NodeSettingsFragment.java @@ -170,7 +170,6 @@ public class NodeSettingsFragment extends PreferenceFragment implements @Override public void onClick(DialogInterface dialogInterface, int i) { mSyncthingService.getApi().deleteNode(mNode, getActivity()); - getActivity().finish(); } }) .setNegativeButton(android.R.string.no, null) @@ -273,17 +272,12 @@ public class NodeSettingsFragment extends PreferenceFragment implements /** * Callback for {@link RestApi#editNode}. - * Displays an error message if present, or finishes the Activity on success in edit mode. - * - * @param normalizedId The normalized node ID, or null on error. - * @param error An error message, or null on success. + * Displays an error toast if error message present. */ @Override public void onNodeIdNormalized(String normalizedId, String error) { if (error != null) { Toast.makeText(getActivity(), error, Toast.LENGTH_LONG).show(); - } else if (mIsCreate) { - getActivity().finish(); } } diff --git a/src/main/java/com/nutomic/syncthingandroid/fragments/RepoSettingsFragment.java b/src/main/java/com/nutomic/syncthingandroid/fragments/RepoSettingsFragment.java index 353e3f85..a721b198 100644 --- a/src/main/java/com/nutomic/syncthingandroid/fragments/RepoSettingsFragment.java +++ b/src/main/java/com/nutomic/syncthingandroid/fragments/RepoSettingsFragment.java @@ -190,7 +190,6 @@ public class RepoSettingsFragment extends PreferenceFragment return true; } mSyncthingService.getApi().editRepo(mRepo, true, getActivity()); - getActivity().finish(); return true; case R.id.delete: new AlertDialog.Builder(getActivity()) @@ -199,7 +198,6 @@ public class RepoSettingsFragment extends PreferenceFragment @Override public void onClick(DialogInterface dialogInterface, int i) { mSyncthingService.getApi().deleteRepo(mRepo, getActivity()); - getActivity().finish(); } }) .setNegativeButton(android.R.string.no, null)