1
0
mirror of https://github.com/bitwarden/mobile.git synced 2024-11-24 11:55:38 +01:00

os version checks on auth service apis

This commit is contained in:
kspearrin 2018-09-29 12:14:44 -04:00
parent f8d5ee9d5d
commit f19a8a3cc5

View File

@ -149,7 +149,7 @@ namespace Bit.iOS
MessagingCenter.Subscribe<Xamarin.Forms.Application, bool>( MessagingCenter.Subscribe<Xamarin.Forms.Application, bool>(
Xamarin.Forms.Application.Current, "FullSyncCompleted", async (sender, successfully) => Xamarin.Forms.Application.Current, "FullSyncCompleted", async (sender, successfully) =>
{ {
if(successfully) if(_deviceInfoService.Version >= 12 && successfully)
{ {
await ASHelpers.ReplaceAllIdentities(_cipherService); await ASHelpers.ReplaceAllIdentities(_cipherService);
} }
@ -158,7 +158,7 @@ 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(await ASHelpers.IdentitiesCanIncremental()) if(_deviceInfoService.Version >= 12 && await ASHelpers.IdentitiesCanIncremental())
{ {
if(data.Item2) if(data.Item2)
{ {
@ -178,7 +178,7 @@ namespace Bit.iOS
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(await ASHelpers.IdentitiesCanIncremental()) if(_deviceInfoService.Version >= 12 && await ASHelpers.IdentitiesCanIncremental())
{ {
var identity = ASHelpers.ToCredentialIdentity(cipher); var identity = ASHelpers.ToCredentialIdentity(cipher);
if(identity == null) if(identity == null)
@ -195,7 +195,9 @@ namespace Bit.iOS
MessagingCenter.Subscribe<Xamarin.Forms.Application>( MessagingCenter.Subscribe<Xamarin.Forms.Application>(
Xamarin.Forms.Application.Current, "LoggedOut", async (sender) => Xamarin.Forms.Application.Current, "LoggedOut", async (sender) =>
{ {
if(_deviceInfoService.Version >= 12) {
await ASCredentialIdentityStore.SharedStore.RemoveAllCredentialIdentitiesAsync(); await ASCredentialIdentityStore.SharedStore.RemoveAllCredentialIdentitiesAsync();
}
}); });
ZXing.Net.Mobile.Forms.iOS.Platform.Init(); ZXing.Net.Mobile.Forms.iOS.Platform.Init();