diff --git a/src/main/java/com/nutomic/syncthingandroid/activities/DeviceActivity.java b/src/main/java/com/nutomic/syncthingandroid/activities/DeviceActivity.java index fadfdfba..41acda8f 100644 --- a/src/main/java/com/nutomic/syncthingandroid/activities/DeviceActivity.java +++ b/src/main/java/com/nutomic/syncthingandroid/activities/DeviceActivity.java @@ -304,8 +304,10 @@ public class DeviceActivity extends SyncthingActivity implements View.OnClickLis case R.id.remove: new AlertDialog.Builder(this) .setMessage(R.string.remove_device_confirm) - .setPositiveButton(android.R.string.yes, (dialogInterface, i) -> - getApi().removeDevice(mDevice.deviceID)) + .setPositiveButton(android.R.string.yes, (dialogInterface, i) -> { + getApi().removeDevice(mDevice.deviceID); + finish(); + }) .setNegativeButton(android.R.string.no, null) .show(); return true; diff --git a/src/main/java/com/nutomic/syncthingandroid/activities/FolderActivity.java b/src/main/java/com/nutomic/syncthingandroid/activities/FolderActivity.java index 29bc8f62..deed9172 100644 --- a/src/main/java/com/nutomic/syncthingandroid/activities/FolderActivity.java +++ b/src/main/java/com/nutomic/syncthingandroid/activities/FolderActivity.java @@ -307,8 +307,10 @@ public class FolderActivity extends SyncthingActivity case R.id.remove: new AlertDialog.Builder(this) .setMessage(R.string.remove_folder_confirm) - .setPositiveButton(android.R.string.yes, (dialogInterface, i) -> - getApi().removeFolder(mFolder.id)) + .setPositiveButton(android.R.string.yes, (dialogInterface, i) -> { + getApi().removeFolder(mFolder.id); + finish(); + }) .setNegativeButton(android.R.string.no, null) .show(); return true;