From 437a60a967092119cb07a8058e6fe18478b0a013 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Tue, 28 May 2019 22:57:59 -0400 Subject: [PATCH] crash fixes --- .../Pages/Vault/GroupingsPage/GroupingsPageViewModel.cs | 7 +++++++ src/Core/Services/SettingsService.cs | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/App/Pages/Vault/GroupingsPage/GroupingsPageViewModel.cs b/src/App/Pages/Vault/GroupingsPage/GroupingsPageViewModel.cs index 9eb810017..83317aa91 100644 --- a/src/App/Pages/Vault/GroupingsPage/GroupingsPageViewModel.cs +++ b/src/App/Pages/Vault/GroupingsPage/GroupingsPageViewModel.cs @@ -15,6 +15,7 @@ namespace Bit.App.Pages public class GroupingsPageViewModel : BaseViewModel { private bool _refreshing; + private bool _doingLoad; private bool _loading; private bool _loaded; private bool _showAddCipherButton; @@ -107,6 +108,11 @@ namespace Bit.App.Pages public async Task LoadAsync() { + if(_doingLoad) + { + return; + } + _doingLoad = true; ShowNoData = false; Loading = true; ShowList = false; @@ -190,6 +196,7 @@ namespace Bit.App.Pages } finally { + _doingLoad = false; ShowNoData = !groupedItems.Any(); ShowList = !ShowNoData; Loaded = true; diff --git a/src/Core/Services/SettingsService.cs b/src/Core/Services/SettingsService.cs index e8804f4a8..a4b491e39 100644 --- a/src/Core/Services/SettingsService.cs +++ b/src/Core/Services/SettingsService.cs @@ -37,7 +37,7 @@ namespace Bit.Core.Services if(settings != null && settings.ContainsKey(Keys_EquivalentDomains)) { var jArray = (settings[Keys_EquivalentDomains] as JArray); - return jArray.ToObject>>(); + return jArray?.ToObject>>(); } return null; }