mirror of
https://github.com/bitwarden/android.git
synced 2024-10-31 15:15:34 +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.LockOptionImmediately, AppResources.LockOption1Minute, AppResources.LockOption15Minutes,
|
||||||
AppResources.LockOption1Hour, AppResources.LockOption4Hours, AppResources.Never);
|
AppResources.LockOption1Hour, AppResources.LockOption4Hours, AppResources.Never);
|
||||||
|
|
||||||
if(selection == AppResources.Cancel)
|
if(selection == null || selection == AppResources.Cancel)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -314,6 +314,10 @@ namespace Bit.App.Pages
|
||||||
{
|
{
|
||||||
_settings.AddOrUpdateValue(Constants.SettingLockSeconds, -1);
|
_settings.AddOrUpdateValue(Constants.SettingLockSeconds, -1);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
LockOptionsCell.Detail = selection;
|
LockOptionsCell.Detail = selection;
|
||||||
}
|
}
|
||||||
|
|
|
@ -167,7 +167,7 @@ namespace Bit.App.Utilities
|
||||||
AppResources.TypeLogin, AppResources.TypeCard, AppResources.TypeIdentity, AppResources.TypeSecureNote);
|
AppResources.TypeLogin, AppResources.TypeCard, AppResources.TypeIdentity, AppResources.TypeSecureNote);
|
||||||
|
|
||||||
var selectedType = CipherType.SecureNote;
|
var selectedType = CipherType.SecureNote;
|
||||||
if(type == AppResources.Cancel)
|
if(type == null || type == AppResources.Cancel)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -183,6 +183,10 @@ namespace Bit.App.Utilities
|
||||||
{
|
{
|
||||||
selectedType = CipherType.Identity;
|
selectedType = CipherType.Identity;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var addPage = new VaultAddCipherPage(selectedType, defaultFolderId: folderId);
|
var addPage = new VaultAddCipherPage(selectedType, defaultFolderId: folderId);
|
||||||
await page.Navigation.PushForDeviceAsync(addPage);
|
await page.Navigation.PushForDeviceAsync(addPage);
|
||||||
|
|
Loading…
Reference in a new issue