replace all on updates

This commit is contained in:
Kyle Spearrin 2018-09-21 21:59:11 -04:00
parent d958dc6bce
commit 3fff0617fe

View file

@ -159,24 +159,19 @@ namespace Bit.iOS
Xamarin.Forms.Application.Current, "UpsertedCipher", async (sender, data) =>
{
if(await ASHelpers.IdentitiesCanIncremental())
{
if(data.Item2)
{
var identity = await ASHelpers.GetCipherIdentityAsync(data.Item1, _cipherService);
if(identity == null)
{
return;
}
if(data.Item2)
{
await ASCredentialIdentityStore.SharedStore.SaveCredentialIdentitiesAsync(
new ASPasswordCredentialIdentity[] { identity });
}
else
{
await ASCredentialIdentityStore.SharedStore.ReplaceCredentialIdentitiesAsync(
new ASPasswordCredentialIdentity[] { identity });
}
return;
}
}
await ASHelpers.ReplaceAllIdentities(_cipherService);
});