From b782eeb839be11a169d4590785216c9defe7a894 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Fri, 14 Jun 2019 18:08:08 -0400 Subject: [PATCH] fixes to 2fa page --- src/App/Pages/Accounts/TwoFactorPage.xaml | 13 +++++++------ src/App/Pages/Accounts/TwoFactorPage.xaml.cs | 6 +++--- src/iOS/Renderers/HybridWebViewRenderer.cs | 7 +++++-- 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/src/App/Pages/Accounts/TwoFactorPage.xaml b/src/App/Pages/Accounts/TwoFactorPage.xaml index a17c229c0..06f5ac2a2 100644 --- a/src/App/Pages/Accounts/TwoFactorPage.xaml +++ b/src/App/Pages/Accounts/TwoFactorPage.xaml @@ -13,19 +13,20 @@ + + + + + - - - - - diff --git a/src/App/Pages/Accounts/TwoFactorPage.xaml.cs b/src/App/Pages/Accounts/TwoFactorPage.xaml.cs index 52f0d84b0..5d448721e 100644 --- a/src/App/Pages/Accounts/TwoFactorPage.xaml.cs +++ b/src/App/Pages/Accounts/TwoFactorPage.xaml.cs @@ -26,7 +26,7 @@ namespace Bit.App.Pages DuoWebView = _duoWebView; if(Device.RuntimePlatform == Device.Android) { - ToolbarItems.RemoveAt(0); + ToolbarItems.Remove(_cancelItem); } } @@ -34,7 +34,7 @@ namespace Bit.App.Pages public void AddContinueButton() { - if(ToolbarItems.Count == 0) + if(!ToolbarItems.Contains(_continueItem)) { ToolbarItems.Add(_continueItem); } @@ -42,7 +42,7 @@ namespace Bit.App.Pages public void RemoveContinueButton() { - if(ToolbarItems.Count > 0) + if(ToolbarItems.Contains(_continueItem)) { ToolbarItems.Remove(_continueItem); } diff --git a/src/iOS/Renderers/HybridWebViewRenderer.cs b/src/iOS/Renderers/HybridWebViewRenderer.cs index 33766fe5a..aae1d2832 100644 --- a/src/iOS/Renderers/HybridWebViewRenderer.cs +++ b/src/iOS/Renderers/HybridWebViewRenderer.cs @@ -40,14 +40,17 @@ namespace Bit.iOS.Renderers } if(e.NewElement != null) { - Control.LoadRequest(new NSUrlRequest(new NSUrl(Element.Uri))); + if(Element.Uri != null) + { + Control.LoadRequest(new NSUrlRequest(new NSUrl(Element.Uri))); + } } } protected override void OnElementPropertyChanged(object sender, PropertyChangedEventArgs e) { base.OnElementPropertyChanged(sender, e); - if(e.PropertyName == HybridWebView.UriProperty.PropertyName) + if(e.PropertyName == HybridWebView.UriProperty.PropertyName && Element.Uri != null) { Control.LoadRequest(new NSUrlRequest(new NSUrl(Element.Uri))); }