mirror of
https://github.com/bitwarden/android.git
synced 2024-10-31 23:25:45 +03:00
InitAppIfNeeded
This commit is contained in:
parent
13ddd10c40
commit
9164c9b946
1 changed files with 12 additions and 0 deletions
|
@ -34,6 +34,7 @@ namespace Bit.iOS.Autofill
|
||||||
|
|
||||||
public override void PrepareCredentialList(ASCredentialServiceIdentifier[] serviceIdentifiers)
|
public override void PrepareCredentialList(ASCredentialServiceIdentifier[] serviceIdentifiers)
|
||||||
{
|
{
|
||||||
|
InitAppIfNeeded();
|
||||||
_context.ServiceIdentifiers = serviceIdentifiers;
|
_context.ServiceIdentifiers = serviceIdentifiers;
|
||||||
if(serviceIdentifiers.Length > 0)
|
if(serviceIdentifiers.Length > 0)
|
||||||
{
|
{
|
||||||
|
@ -67,6 +68,7 @@ namespace Bit.iOS.Autofill
|
||||||
|
|
||||||
public override void ProvideCredentialWithoutUserInteraction(ASPasswordCredentialIdentity credentialIdentity)
|
public override void ProvideCredentialWithoutUserInteraction(ASPasswordCredentialIdentity credentialIdentity)
|
||||||
{
|
{
|
||||||
|
InitAppIfNeeded();
|
||||||
if(!IsAuthed() || IsLocked())
|
if(!IsAuthed() || IsLocked())
|
||||||
{
|
{
|
||||||
var err = new NSError(new NSString("ASExtensionErrorDomain"),
|
var err = new NSError(new NSString("ASExtensionErrorDomain"),
|
||||||
|
@ -80,6 +82,7 @@ namespace Bit.iOS.Autofill
|
||||||
|
|
||||||
public override void PrepareInterfaceToProvideCredential(ASPasswordCredentialIdentity credentialIdentity)
|
public override void PrepareInterfaceToProvideCredential(ASPasswordCredentialIdentity credentialIdentity)
|
||||||
{
|
{
|
||||||
|
InitAppIfNeeded();
|
||||||
if(!CheckAuthed())
|
if(!CheckAuthed())
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
@ -90,6 +93,7 @@ namespace Bit.iOS.Autofill
|
||||||
|
|
||||||
public override void PrepareInterfaceForExtensionConfiguration()
|
public override void PrepareInterfaceForExtensionConfiguration()
|
||||||
{
|
{
|
||||||
|
InitAppIfNeeded();
|
||||||
_context.Configuring = true;
|
_context.Configuring = true;
|
||||||
if(!CheckAuthed())
|
if(!CheckAuthed())
|
||||||
{
|
{
|
||||||
|
@ -260,5 +264,13 @@ namespace Bit.iOS.Autofill
|
||||||
iOSCoreHelpers.Bootstrap();
|
iOSCoreHelpers.Bootstrap();
|
||||||
iOSCoreHelpers.AppearanceAdjustments();
|
iOSCoreHelpers.AppearanceAdjustments();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void InitAppIfNeeded()
|
||||||
|
{
|
||||||
|
if(ServiceContainer.RegisteredServices == null || ServiceContainer.RegisteredServices.Count == 0)
|
||||||
|
{
|
||||||
|
InitApp();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in a new issue