catch errors
This commit is contained in:
parent
5b119ded17
commit
636d3c02c4
|
@ -46,7 +46,10 @@ namespace Bit.App.Pages
|
||||||
if(EditMode)
|
if(EditMode)
|
||||||
{
|
{
|
||||||
var folder = await _folderService.GetAsync(FolderId);
|
var folder = await _folderService.GetAsync(FolderId);
|
||||||
Folder = await folder.DecryptAsync();
|
if(folder != null)
|
||||||
|
{
|
||||||
|
Folder = await folder.DecryptAsync();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -3,6 +3,8 @@ using Bit.App.Resources;
|
||||||
using Bit.Core.Abstractions;
|
using Bit.Core.Abstractions;
|
||||||
using Bit.Core.Enums;
|
using Bit.Core.Enums;
|
||||||
using Bit.Core.Utilities;
|
using Bit.Core.Utilities;
|
||||||
|
using System;
|
||||||
|
using System.Threading.Tasks;
|
||||||
using Xamarin.Forms;
|
using Xamarin.Forms;
|
||||||
|
|
||||||
namespace Bit.App.Pages
|
namespace Bit.App.Pages
|
||||||
|
@ -31,7 +33,15 @@ namespace Bit.App.Pages
|
||||||
base.OnAppearing();
|
base.OnAppearing();
|
||||||
await LoadOnAppearedAsync(_mainLayout, false, async () =>
|
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);
|
}, _mainContent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue