From 4b9a036e5e66ff3176dd2b4da55a8bf7e5ece72e Mon Sep 17 00:00:00 2001 From: Matt Portune <59324545+mportune-bw@users.noreply.github.com> Date: Wed, 20 May 2020 09:57:48 -0400 Subject: [PATCH] Removal of lifecycle hack for 2FA resume flow (#912) --- src/App/App.xaml.cs | 21 ------------------- .../Pages/Accounts/TwoFactorPageViewModel.cs | 1 - 2 files changed, 22 deletions(-) diff --git a/src/App/App.xaml.cs b/src/App/App.xaml.cs index 903528473..e862ffa34 100644 --- a/src/App/App.xaml.cs +++ b/src/App/App.xaml.cs @@ -153,27 +153,6 @@ namespace Bit.App }); } - // Workaround for https://github.com/xamarin/Xamarin.Forms/issues/7478 - // Fixed in last Xamarin.Forms 4.4.0.x - remove this hack after updating - public static void WaitForResume() - { - var checkFrequencyInMillis = 100; - var maxTimeInMillis = 5000; - - var count = 0; - while (!_isResumed) - { - Task.Delay(checkFrequencyInMillis).Wait(); - count += checkFrequencyInMillis; - - // don't let this run forever - if (count >= maxTimeInMillis) - { - break; - } - } - } - protected async override void OnStart() { System.Diagnostics.Debug.WriteLine("XF App: OnStart"); diff --git a/src/App/Pages/Accounts/TwoFactorPageViewModel.cs b/src/App/Pages/Accounts/TwoFactorPageViewModel.cs index f716bd79a..e7087f946 100644 --- a/src/App/Pages/Accounts/TwoFactorPageViewModel.cs +++ b/src/App/Pages/Accounts/TwoFactorPageViewModel.cs @@ -143,7 +143,6 @@ namespace Bit.App.Pages page.DuoWebView.RegisterAction(sig => { Token = sig; - App.WaitForResume(); Device.BeginInvokeOnMainThread(async () => await SubmitAsync()); }); break;