mirror of
https://github.com/bitwarden/android.git
synced 2024-10-31 23:25:45 +03:00
ios < 12 fixes
This commit is contained in:
parent
8d9a5bc08f
commit
a4f93eea45
1 changed files with 21 additions and 15 deletions
|
@ -158,38 +158,44 @@ namespace Bit.iOS
|
||||||
MessagingCenter.Subscribe<Xamarin.Forms.Application, Tuple<string, bool>>(
|
MessagingCenter.Subscribe<Xamarin.Forms.Application, Tuple<string, bool>>(
|
||||||
Xamarin.Forms.Application.Current, "UpsertedCipher", async (sender, data) =>
|
Xamarin.Forms.Application.Current, "UpsertedCipher", async (sender, data) =>
|
||||||
{
|
{
|
||||||
if(_deviceInfoService.Version >= 12 && await ASHelpers.IdentitiesCanIncremental())
|
if (_deviceInfoService.Version >= 12)
|
||||||
{
|
{
|
||||||
if(data.Item2)
|
if (await ASHelpers.IdentitiesCanIncremental())
|
||||||
{
|
{
|
||||||
var identity = await ASHelpers.GetCipherIdentityAsync(data.Item1, _cipherService);
|
if (data.Item2)
|
||||||
if(identity == null)
|
|
||||||
{
|
{
|
||||||
|
var identity = await ASHelpers.GetCipherIdentityAsync(data.Item1, _cipherService);
|
||||||
|
if (identity == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
await ASCredentialIdentityStore.SharedStore.SaveCredentialIdentitiesAsync(
|
||||||
|
new ASPasswordCredentialIdentity[] { identity });
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
await ASCredentialIdentityStore.SharedStore.SaveCredentialIdentitiesAsync(
|
|
||||||
new ASPasswordCredentialIdentity[] { identity });
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
await ASHelpers.ReplaceAllIdentities(_cipherService);
|
||||||
}
|
}
|
||||||
await ASHelpers.ReplaceAllIdentities(_cipherService);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
MessagingCenter.Subscribe<Xamarin.Forms.Application, Cipher>(
|
MessagingCenter.Subscribe<Xamarin.Forms.Application, Cipher>(
|
||||||
Xamarin.Forms.Application.Current, "DeletedCipher", async (sender, cipher) =>
|
Xamarin.Forms.Application.Current, "DeletedCipher", async (sender, cipher) =>
|
||||||
{
|
{
|
||||||
if(_deviceInfoService.Version >= 12 && await ASHelpers.IdentitiesCanIncremental())
|
if (_deviceInfoService.Version >= 12)
|
||||||
{
|
{
|
||||||
var identity = ASHelpers.ToCredentialIdentity(cipher);
|
if (await ASHelpers.IdentitiesCanIncremental())
|
||||||
if(identity == null)
|
|
||||||
{
|
{
|
||||||
|
var identity = ASHelpers.ToCredentialIdentity(cipher);
|
||||||
|
if (identity == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
await ASCredentialIdentityStore.SharedStore.RemoveCredentialIdentitiesAsync(
|
||||||
|
new ASPasswordCredentialIdentity[] { identity });
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
await ASCredentialIdentityStore.SharedStore.RemoveCredentialIdentitiesAsync(
|
await ASHelpers.ReplaceAllIdentities(_cipherService);
|
||||||
new ASPasswordCredentialIdentity[] { identity });
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
await ASHelpers.ReplaceAllIdentities(_cipherService);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
MessagingCenter.Subscribe<Xamarin.Forms.Application>(
|
MessagingCenter.Subscribe<Xamarin.Forms.Application>(
|
||||||
|
|
Loading…
Reference in a new issue