1
0
mirror of https://github.com/bitwarden/mobile.git synced 2024-09-30 04:17:55 +02:00

handle null conditions from action sheet

This commit is contained in:
Kyle Spearrin 2018-01-03 17:07:33 -05:00
parent cf9e820227
commit 310d51d859
2 changed files with 10 additions and 2 deletions

View File

@ -285,7 +285,7 @@ namespace Bit.App.Pages
AppResources.LockOptionImmediately, AppResources.LockOption1Minute, AppResources.LockOption15Minutes,
AppResources.LockOption1Hour, AppResources.LockOption4Hours, AppResources.Never);
if(selection == AppResources.Cancel)
if(selection == null || selection == AppResources.Cancel)
{
return;
}
@ -314,6 +314,10 @@ namespace Bit.App.Pages
{
_settings.AddOrUpdateValue(Constants.SettingLockSeconds, -1);
}
else
{
return;
}
LockOptionsCell.Detail = selection;
}

View File

@ -167,7 +167,7 @@ namespace Bit.App.Utilities
AppResources.TypeLogin, AppResources.TypeCard, AppResources.TypeIdentity, AppResources.TypeSecureNote);
var selectedType = CipherType.SecureNote;
if(type == AppResources.Cancel)
if(type == null || type == AppResources.Cancel)
{
return;
}
@ -183,6 +183,10 @@ namespace Bit.App.Utilities
{
selectedType = CipherType.Identity;
}
else
{
return;
}
var addPage = new VaultAddCipherPage(selectedType, defaultFolderId: folderId);
await page.Navigation.PushForDeviceAsync(addPage);