1
0
Fork 0
mirror of https://github.com/syncthing/syncthing-android.git synced 2024-12-22 19:01:30 +00:00

Finish activity after removing device/folder (fixes #796)

This commit is contained in:
Felix Ableitner 2016-12-01 18:15:19 +09:00
parent 9209a8fb6c
commit 29c9003402
2 changed files with 8 additions and 4 deletions

View file

@ -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;

View file

@ -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;