mirror of
https://github.com/bitwarden/android.git
synced 2024-12-25 18:38:27 +03:00
Removal of lifecycle hack for 2FA resume flow (#912)
This commit is contained in:
parent
4576f378cc
commit
4b9a036e5e
2 changed files with 0 additions and 22 deletions
|
@ -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()
|
protected async override void OnStart()
|
||||||
{
|
{
|
||||||
System.Diagnostics.Debug.WriteLine("XF App: OnStart");
|
System.Diagnostics.Debug.WriteLine("XF App: OnStart");
|
||||||
|
|
|
@ -143,7 +143,6 @@ namespace Bit.App.Pages
|
||||||
page.DuoWebView.RegisterAction(sig =>
|
page.DuoWebView.RegisterAction(sig =>
|
||||||
{
|
{
|
||||||
Token = sig;
|
Token = sig;
|
||||||
App.WaitForResume();
|
|
||||||
Device.BeginInvokeOnMainThread(async () => await SubmitAsync());
|
Device.BeginInvokeOnMainThread(async () => await SubmitAsync());
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue