1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-05 23:53:33 +00:00

Soft delete feature (#890)

* [Soft Delete] Added trash folder to mobile (#856)

* [Soft Delete] Added trash folder to mobile

* [Soft Delete] - Revert send to trash label

Co-authored-by: Chad Scharf <cscharf@users.noreply.github.com>

* [Soft Delete] - Fix for iOS autofill index behavior (#859)

* [Soft Delete] Added trash folder to mobile

* [Soft Delete] - Revert send to trash label

* [Soft Delete] - iOS autofill index behavior fix

Co-authored-by: Chad Scharf <cscharf@users.noreply.github.com>

Co-authored-by: Chad Scharf <cscharf@users.noreply.github.com>
This commit is contained in:
Chad Scharf
2020-05-20 13:35:20 -04:00
committed by GitHub
parent 4b9a036e5e
commit ce965ba5e1
25 changed files with 378 additions and 40 deletions

View File

@@ -489,7 +489,8 @@ namespace Bit.App.Pages
AppResources.InternetConnectionRequiredTitle);
return false;
}
var confirmed = await _platformUtilsService.ShowDialogAsync(AppResources.DoYouReallyWantToDelete,
var confirmed = await _platformUtilsService.ShowDialogAsync(
AppResources.DoYouReallyWantToSoftDeleteCipher,
null, AppResources.Yes, AppResources.Cancel);
if (!confirmed)
{
@@ -497,11 +498,11 @@ namespace Bit.App.Pages
}
try
{
await _deviceActionService.ShowLoadingAsync(AppResources.Deleting);
await _cipherService.DeleteWithServerAsync(Cipher.Id);
await _deviceActionService.ShowLoadingAsync(AppResources.SoftDeleting);
await _cipherService.SoftDeleteWithServerAsync(Cipher.Id);
await _deviceActionService.HideLoadingAsync();
_platformUtilsService.ShowToast("success", null, AppResources.ItemDeleted);
_messagingService.Send("deletedCipher", Cipher);
_platformUtilsService.ShowToast("success", null, AppResources.ItemSoftDeleted);
_messagingService.Send("softDeletedCipher", Cipher);
return true;
}
catch (ApiException e)