mirror of
https://github.com/bitwarden/android.git
synced 2024-12-25 10:28:28 +03:00
null checks
This commit is contained in:
parent
61b728fea7
commit
58ef292fa7
1 changed files with 8 additions and 0 deletions
|
@ -367,6 +367,10 @@ namespace Bit.App.Pages
|
||||||
|
|
||||||
public async Task<bool> SubmitAsync()
|
public async Task<bool> SubmitAsync()
|
||||||
{
|
{
|
||||||
|
if(Cipher == null)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
if(Xamarin.Essentials.Connectivity.NetworkAccess == Xamarin.Essentials.NetworkAccess.None)
|
if(Xamarin.Essentials.Connectivity.NetworkAccess == Xamarin.Essentials.NetworkAccess.None)
|
||||||
{
|
{
|
||||||
await _platformUtilsService.ShowDialogAsync(AppResources.InternetConnectionRequiredMessage,
|
await _platformUtilsService.ShowDialogAsync(AppResources.InternetConnectionRequiredMessage,
|
||||||
|
@ -406,6 +410,10 @@ namespace Bit.App.Pages
|
||||||
}
|
}
|
||||||
|
|
||||||
var cipher = await _cipherService.EncryptAsync(Cipher);
|
var cipher = await _cipherService.EncryptAsync(Cipher);
|
||||||
|
if(cipher == null)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
await _deviceActionService.ShowLoadingAsync(AppResources.Saving);
|
await _deviceActionService.ShowLoadingAsync(AppResources.Saving);
|
||||||
|
|
Loading…
Reference in a new issue