From 4576f378ccbbeeca62561fc4be10c118c30dbba7 Mon Sep 17 00:00:00 2001 From: Matt Portune <59324545+mportune-bw@users.noreply.github.com> Date: Wed, 20 May 2020 09:09:28 -0400 Subject: [PATCH] lock screen drawing & 2FA entry bugfixes (#910) * lock screen drawing & 2FA entry bugfixes * cleanup whitespace --- src/App/App.xaml.cs | 7 ------- src/App/Pages/Accounts/TwoFactorPage.xaml.cs | 20 ++++++++++---------- 2 files changed, 10 insertions(+), 17 deletions(-) diff --git a/src/App/App.xaml.cs b/src/App/App.xaml.cs index 117bc6c43..903528473 100644 --- a/src/App/App.xaml.cs +++ b/src/App/App.xaml.cs @@ -234,13 +234,6 @@ namespace Bit.App SyncIfNeeded(); if (Current.MainPage is NavigationPage navPage && navPage.CurrentPage is LockPage lockPage) { - if (Device.RuntimePlatform == Device.Android) - { - // Workaround for https://github.com/xamarin/Xamarin.Forms/issues/7478 - await Task.Delay(100); - Current.MainPage = new NavigationPage(lockPage); - // End workaround - } await lockPage.PromptFingerprintAfterResumeAsync(); } } diff --git a/src/App/Pages/Accounts/TwoFactorPage.xaml.cs b/src/App/Pages/Accounts/TwoFactorPage.xaml.cs index 0e93e2009..94732d2ea 100644 --- a/src/App/Pages/Accounts/TwoFactorPage.xaml.cs +++ b/src/App/Pages/Accounts/TwoFactorPage.xaml.cs @@ -82,19 +82,19 @@ namespace Bit.App.Pages } }); - if (!_inited) + await LoadOnAppearedAsync(_scrollView, true, () => { - _inited = true; - await LoadOnAppearedAsync(_scrollView, true, () => + if (!_inited) { + _inited = true; _vm.Init(); - if (_vm.TotpMethod) - { - RequestFocus(_totpEntry); - } - return Task.FromResult(0); - }); - } + } + if (_vm.TotpMethod) + { + RequestFocus(_totpEntry); + } + return Task.FromResult(0); + }); } protected override void OnDisappearing()