From 7d3ef39f676a538fbee6e4252187e630cf7d9123 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Mon, 6 May 2019 23:22:48 -0400 Subject: [PATCH] more do once --- src/App/Pages/Vault/ViewPage.xaml.cs | 5 ++++- src/App/Pages/Vault/ViewPageViewModel.cs | 11 +++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/App/Pages/Vault/ViewPage.xaml.cs b/src/App/Pages/Vault/ViewPage.xaml.cs index dadc6c836..11b4c6f84 100644 --- a/src/App/Pages/Vault/ViewPage.xaml.cs +++ b/src/App/Pages/Vault/ViewPage.xaml.cs @@ -50,7 +50,10 @@ namespace Bit.App.Pages private async void PasswordHistory_Tapped(object sender, System.EventArgs e) { - await Navigation.PushModalAsync(new NavigationPage(new PasswordHistoryPage(_vm.CipherId))); + if(DoOnce()) + { + await Navigation.PushModalAsync(new NavigationPage(new PasswordHistoryPage(_vm.CipherId))); + } } } } diff --git a/src/App/Pages/Vault/ViewPageViewModel.cs b/src/App/Pages/Vault/ViewPageViewModel.cs index a43ed3cd5..31afbf75a 100644 --- a/src/App/Pages/Vault/ViewPageViewModel.cs +++ b/src/App/Pages/Vault/ViewPageViewModel.cs @@ -1,5 +1,4 @@ using Bit.App.Abstractions; -using Bit.App.Models; using Bit.App.Resources; using Bit.App.Utilities; using Bit.Core.Abstractions; @@ -289,6 +288,10 @@ namespace Bit.App.Pages private async void CheckPasswordAsync() { + if(!(Page as BaseContentPage).DoOnce()) + { + return; + } if(string.IsNullOrWhiteSpace(Cipher.Login?.Password)) { return; @@ -309,6 +312,10 @@ namespace Bit.App.Pages private async void DownloadAttachmentAsync(AttachmentView attachment) { + if(!(Page as BaseContentPage).DoOnce()) + { + return; + } if(Cipher.OrganizationId == null && !CanAccessPremium) { await _platformUtilsService.ShowDialogAsync(AppResources.PremiumRequired); @@ -411,7 +418,7 @@ namespace Bit.App.Pages private void LaunchUri(LoginUriView uri) { - if(uri.CanLaunch) + if(uri.CanLaunch && (Page as BaseContentPage).DoOnce()) { _platformUtilsService.LaunchUri(uri.LaunchUri); }