catch errors

This commit is contained in:
Kyle Spearrin 2019-06-13 20:41:24 -04:00
parent 5b119ded17
commit 636d3c02c4
2 changed files with 15 additions and 2 deletions

View File

@ -46,7 +46,10 @@ namespace Bit.App.Pages
if(EditMode)
{
var folder = await _folderService.GetAsync(FolderId);
Folder = await folder.DecryptAsync();
if(folder != null)
{
Folder = await folder.DecryptAsync();
}
}
else
{

View File

@ -3,6 +3,8 @@ using Bit.App.Resources;
using Bit.Core.Abstractions;
using Bit.Core.Enums;
using Bit.Core.Utilities;
using System;
using System.Threading.Tasks;
using Xamarin.Forms;
namespace Bit.App.Pages
@ -31,7 +33,15 @@ namespace Bit.App.Pages
base.OnAppearing();
await LoadOnAppearedAsync(_mainLayout, false, async () =>
{
await _vm.LoadAsync();
try
{
await _vm.LoadAsync();
}
catch(Exception e) when(e.Message.Contains("No key."))
{
await Task.Delay(5000);
await _vm.LoadAsync();
}
}, _mainContent);
}