1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-18 01:03:24 +00:00

PM-6685 Fix race condition issue where the biometrics check is being done before the iOS extension is being shown. So when we need the UI, we wait until ViewDidAppear happens. (#3078)

This commit is contained in:
Federico Maccaroni
2024-03-14 18:07:52 -03:00
committed by GitHub
parent 144fc7c727
commit 74085689d3
10 changed files with 64 additions and 17 deletions

View File

@@ -32,6 +32,7 @@ namespace Bit.iOS.Autofill
private IAccountsManager _accountsManager;
private readonly LazyResolve<IStateService> _stateService = new LazyResolve<IStateService>();
private readonly LazyResolve<IConditionedAwaiterManager> _conditionedAwaiterManager = new LazyResolve<IConditionedAwaiterManager>();
public CredentialProviderViewController(IntPtr handle)
: base(handle)
@@ -56,6 +57,8 @@ namespace Bit.iOS.Autofill
{
ExtContext = ExtensionContext
};
_conditionedAwaiterManager.Value.Recreate(AwaiterPrecondition.AutofillIOSExtensionViewDidAppear);
}
catch (Exception ex)
{
@@ -63,6 +66,13 @@ namespace Bit.iOS.Autofill
}
}
public override void ViewDidAppear(bool animated)
{
base.ViewDidAppear(animated);
_conditionedAwaiterManager.Value.SetAsCompleted(AwaiterPrecondition.AutofillIOSExtensionViewDidAppear);
}
public override async void PrepareCredentialList(ASCredentialServiceIdentifier[] serviceIdentifiers)
{
try