mirror of
https://github.com/bitwarden/mobile
synced 2025-12-16 00:03:22 +00:00
Removal of lifecycle hack for 2FA resume flow (#912)
This commit is contained in:
@@ -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");
|
||||
|
||||
@@ -143,7 +143,6 @@ namespace Bit.App.Pages
|
||||
page.DuoWebView.RegisterAction(sig =>
|
||||
{
|
||||
Token = sig;
|
||||
App.WaitForResume();
|
||||
Device.BeginInvokeOnMainThread(async () => await SubmitAsync());
|
||||
});
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user