diff --git a/src/App/Pages/Vault/GroupingsPage/GroupingsPage.xaml.cs b/src/App/Pages/Vault/GroupingsPage/GroupingsPage.xaml.cs index 501678f5c..d7b8f6b7d 100644 --- a/src/App/Pages/Vault/GroupingsPage/GroupingsPage.xaml.cs +++ b/src/App/Pages/Vault/GroupingsPage/GroupingsPage.xaml.cs @@ -130,24 +130,27 @@ namespace Bit.App.Pages 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 _vm.LoadAsync(); - } - } - else - { - await Task.Delay(5000); - if (!_vm.Loaded) - { - await _vm.LoadAsync(); + await Task.Delay(5000); + if (!_vm.Loaded) + { + await _vm.LoadAsync(); + } } } await ShowPreviousPageAsync(); diff --git a/src/iOS.Core/Renderers/CollectionView/ExtendedGroupableItemsViewController.cs b/src/iOS.Core/Renderers/CollectionView/ExtendedGroupableItemsViewController.cs index 519fcbbb6..0933dc183 100644 --- a/src/iOS.Core/Renderers/CollectionView/ExtendedGroupableItemsViewController.cs +++ b/src/iOS.Core/Renderers/CollectionView/ExtendedGroupableItemsViewController.cs @@ -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 // by crashing with the original exception and not the logger one } + if (ex is IndexOutOfRangeException) + { + return; + } throw colEx; } }