1
0
Fork 0
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:
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: 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;

View file

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