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,8 +46,11 @@ namespace Bit.App.Pages
if(EditMode)
{
var folder = await _folderService.GetAsync(FolderId);
if(folder != null)
{
Folder = await folder.DecryptAsync();
}
}
else
{
Folder = new FolderView();

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
@ -30,8 +32,16 @@ namespace Bit.App.Pages
{
base.OnAppearing();
await LoadOnAppearedAsync(_mainLayout, false, async () =>
{
try
{
await _vm.LoadAsync();
}
catch(Exception e) when(e.Message.Contains("No key."))
{
await Task.Delay(5000);
await _vm.LoadAsync();
}
}, _mainContent);
}