pop page on delete success

This commit is contained in:
Kyle Spearrin 2019-05-30 08:35:50 -04:00
parent 3f8f29dfe7
commit 46a8ffa5ae
4 changed files with 10 additions and 5 deletions

View file

@ -145,7 +145,10 @@ namespace Bit.App.Pages
{
if(DoOnce())
{
await _vm.DeleteAsync();
if(await _vm.DeleteAsync())
{
await Navigation.PopModalAsync();
}
}
}

View file

@ -424,7 +424,7 @@ namespace Bit.App.Pages
public async Task<bool> DeleteAsync()
{
var confirmed = await _platformUtilsService.ShowDialogAsync(AppResources.DoYouReallyWantToDelete,
null, AppResources.Yes, AppResources.No);
null, AppResources.Yes, AppResources.Cancel);
if(!confirmed)
{
return false;
@ -436,7 +436,6 @@ namespace Bit.App.Pages
await _deviceActionService.HideLoadingAsync();
_platformUtilsService.ShowToast("success", null, AppResources.ItemDeleted);
_messagingService.Send("deletedCipher");
await Page.Navigation.PopModalAsync();
return true;
}
catch(ApiException e)

View file

@ -127,7 +127,10 @@ namespace Bit.App.Pages
{
if(DoOnce())
{
await _vm.DeleteAsync();
if(await _vm.DeleteAsync())
{
await Navigation.PopModalAsync();
}
}
}

View file

@ -251,7 +251,7 @@ namespace Bit.App.Pages
public async Task<bool> DeleteAsync()
{
var confirmed = await _platformUtilsService.ShowDialogAsync(AppResources.DoYouReallyWantToDelete,
null, AppResources.Yes, AppResources.No);
null, AppResources.Yes, AppResources.Cancel);
if(!confirmed)
{
return false;