null checks

This commit is contained in:
Kyle Spearrin 2019-06-14 16:22:56 -04:00
parent 07d57ebe8c
commit a0632bcac2

View file

@ -60,6 +60,10 @@ namespace Bit.App.Pages
public async Task<bool> SubmitAsync() public async Task<bool> SubmitAsync()
{ {
if(Folder == 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,
@ -96,6 +100,10 @@ namespace Bit.App.Pages
public async Task<bool> DeleteAsync() public async Task<bool> DeleteAsync()
{ {
if(Folder == 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,