mirror of
https://github.com/bitwarden/mobile.git
synced 2024-11-24 11:55:38 +01:00
replace all on updates
This commit is contained in:
parent
d958dc6bce
commit
3fff0617fe
@ -159,24 +159,19 @@ namespace Bit.iOS
|
|||||||
Xamarin.Forms.Application.Current, "UpsertedCipher", async (sender, data) =>
|
Xamarin.Forms.Application.Current, "UpsertedCipher", async (sender, data) =>
|
||||||
{
|
{
|
||||||
if(await ASHelpers.IdentitiesCanIncremental())
|
if(await ASHelpers.IdentitiesCanIncremental())
|
||||||
|
{
|
||||||
|
if(data.Item2)
|
||||||
{
|
{
|
||||||
var identity = await ASHelpers.GetCipherIdentityAsync(data.Item1, _cipherService);
|
var identity = await ASHelpers.GetCipherIdentityAsync(data.Item1, _cipherService);
|
||||||
if(identity == null)
|
if(identity == null)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(data.Item2)
|
|
||||||
{
|
|
||||||
await ASCredentialIdentityStore.SharedStore.SaveCredentialIdentitiesAsync(
|
await ASCredentialIdentityStore.SharedStore.SaveCredentialIdentitiesAsync(
|
||||||
new ASPasswordCredentialIdentity[] { identity });
|
new ASPasswordCredentialIdentity[] { identity });
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
await ASCredentialIdentityStore.SharedStore.ReplaceCredentialIdentitiesAsync(
|
|
||||||
new ASPasswordCredentialIdentity[] { identity });
|
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
await ASHelpers.ReplaceAllIdentities(_cipherService);
|
await ASHelpers.ReplaceAllIdentities(_cipherService);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user