ios < 12 fixes

This commit is contained in:
kspearrin 2018-10-03 00:29:29 -04:00
parent 8d9a5bc08f
commit a4f93eea45

View file

@ -158,7 +158,9 @@ namespace Bit.iOS
MessagingCenter.Subscribe<Xamarin.Forms.Application, Tuple<string, bool>>(
Xamarin.Forms.Application.Current, "UpsertedCipher", async (sender, data) =>
{
if(_deviceInfoService.Version >= 12 && await ASHelpers.IdentitiesCanIncremental())
if (_deviceInfoService.Version >= 12)
{
if (await ASHelpers.IdentitiesCanIncremental())
{
if (data.Item2)
{
@ -173,12 +175,15 @@ namespace Bit.iOS
}
}
await ASHelpers.ReplaceAllIdentities(_cipherService);
}
});
MessagingCenter.Subscribe<Xamarin.Forms.Application, Cipher>(
Xamarin.Forms.Application.Current, "DeletedCipher", async (sender, cipher) =>
{
if(_deviceInfoService.Version >= 12 && await ASHelpers.IdentitiesCanIncremental())
if (_deviceInfoService.Version >= 12)
{
if (await ASHelpers.IdentitiesCanIncremental())
{
var identity = ASHelpers.ToCredentialIdentity(cipher);
if (identity == null)
@ -190,6 +195,7 @@ namespace Bit.iOS
return;
}
await ASHelpers.ReplaceAllIdentities(_cipherService);
}
});
MessagingCenter.Subscribe<Xamarin.Forms.Application>(