mirror of
https://github.com/bitwarden/mobile.git
synced 2024-11-05 09:01:11 +01:00
[PM-868] Re-open app to item could crash the app (#2813)
* [PM-868] Check for previous page before loading vault. Remove exception throw. * [PM-868] Continue to throw exceptions
This commit is contained in:
parent
71731bb9b7
commit
b23f29511c
@ -130,24 +130,27 @@ namespace Bit.App.Pages
|
|||||||
|
|
||||||
await LoadOnAppearedAsync(_mainLayout, false, async () =>
|
await LoadOnAppearedAsync(_mainLayout, false, async () =>
|
||||||
{
|
{
|
||||||
if (!_syncService.SyncInProgress || (await _cipherService.GetAllAsync()).Any())
|
if (_previousPage == null)
|
||||||
{
|
{
|
||||||
try
|
if (!_syncService.SyncInProgress || (await _cipherService.GetAllAsync()).Any())
|
||||||
{
|
{
|
||||||
await _vm.LoadAsync();
|
try
|
||||||
|
{
|
||||||
|
await _vm.LoadAsync();
|
||||||
|
}
|
||||||
|
catch (Exception e) when (e.Message.Contains("No key."))
|
||||||
|
{
|
||||||
|
await Task.Delay(1000);
|
||||||
|
await _vm.LoadAsync();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch (Exception e) when (e.Message.Contains("No key."))
|
else
|
||||||
{
|
{
|
||||||
await Task.Delay(1000);
|
await Task.Delay(5000);
|
||||||
await _vm.LoadAsync();
|
if (!_vm.Loaded)
|
||||||
}
|
{
|
||||||
}
|
await _vm.LoadAsync();
|
||||||
else
|
}
|
||||||
{
|
|
||||||
await Task.Delay(5000);
|
|
||||||
if (!_vm.Loaded)
|
|
||||||
{
|
|
||||||
await _vm.LoadAsync();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
await ShowPreviousPageAsync();
|
await ShowPreviousPageAsync();
|
||||||
|
@ -38,6 +38,10 @@ namespace Bit.iOS.Core.Renderers.CollectionView
|
|||||||
// Do nothing in here, this is temporary to get more info about the crash, if the logger fails, we want to get the info
|
// Do nothing in here, this is temporary to get more info about the crash, if the logger fails, we want to get the info
|
||||||
// by crashing with the original exception and not the logger one
|
// by crashing with the original exception and not the logger one
|
||||||
}
|
}
|
||||||
|
if (ex is IndexOutOfRangeException)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
throw colEx;
|
throw colEx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user