mirror of
https://github.com/bitwarden/android.git
synced 2024-12-24 18:08:26 +03:00
handle null conditions from action sheet
This commit is contained in:
parent
cf9e820227
commit
310d51d859
2 changed files with 10 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue