mirror of
https://github.com/syncthing/syncthing-android.git
synced 2024-11-26 22:31:16 +00:00
Finish activity after removing device/folder (fixes #796)
This commit is contained in:
parent
9209a8fb6c
commit
29c9003402
2 changed files with 8 additions and 4 deletions
|
@ -304,8 +304,10 @@ public class DeviceActivity extends SyncthingActivity implements View.OnClickLis
|
||||||
case R.id.remove:
|
case R.id.remove:
|
||||||
new AlertDialog.Builder(this)
|
new AlertDialog.Builder(this)
|
||||||
.setMessage(R.string.remove_device_confirm)
|
.setMessage(R.string.remove_device_confirm)
|
||||||
.setPositiveButton(android.R.string.yes, (dialogInterface, i) ->
|
.setPositiveButton(android.R.string.yes, (dialogInterface, i) -> {
|
||||||
getApi().removeDevice(mDevice.deviceID))
|
getApi().removeDevice(mDevice.deviceID);
|
||||||
|
finish();
|
||||||
|
})
|
||||||
.setNegativeButton(android.R.string.no, null)
|
.setNegativeButton(android.R.string.no, null)
|
||||||
.show();
|
.show();
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -307,8 +307,10 @@ public class FolderActivity extends SyncthingActivity
|
||||||
case R.id.remove:
|
case R.id.remove:
|
||||||
new AlertDialog.Builder(this)
|
new AlertDialog.Builder(this)
|
||||||
.setMessage(R.string.remove_folder_confirm)
|
.setMessage(R.string.remove_folder_confirm)
|
||||||
.setPositiveButton(android.R.string.yes, (dialogInterface, i) ->
|
.setPositiveButton(android.R.string.yes, (dialogInterface, i) -> {
|
||||||
getApi().removeFolder(mFolder.id))
|
getApi().removeFolder(mFolder.id);
|
||||||
|
finish();
|
||||||
|
})
|
||||||
.setNegativeButton(android.R.string.no, null)
|
.setNegativeButton(android.R.string.no, null)
|
||||||
.show();
|
.show();
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in a new issue