From 83f451360497ab6a7a31694aeb99420cc8227c1f Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Fri, 15 Jul 2016 01:52:33 -0400 Subject: [PATCH] Move to non-async FetchAndLoadVault --- src/App/Pages/Vault/VaultListSitesPage.cs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/App/Pages/Vault/VaultListSitesPage.cs b/src/App/Pages/Vault/VaultListSitesPage.cs index 35a0a3d0b..3cf0401e5 100644 --- a/src/App/Pages/Vault/VaultListSitesPage.cs +++ b/src/App/Pages/Vault/VaultListSitesPage.cs @@ -53,11 +53,11 @@ namespace Bit.App.Pages private void Init() { - MessagingCenter.Subscribe(Application.Current, "SyncCompleted", async (sender, success) => + MessagingCenter.Subscribe(Application.Current, "SyncCompleted", (sender, success) => { if(success) { - await FetchAndLoadVaultAsync(); + FetchAndLoadVault(); } }); @@ -146,10 +146,10 @@ namespace Bit.App.Pages } } - protected async override void OnAppearing() + protected override void OnAppearing() { base.OnAppearing(); - await FetchAndLoadVaultAsync(); + FetchAndLoadVault(); if(_connectivity.IsConnected && Device.OS == TargetPlatform.iOS && !_favorites) { @@ -157,7 +157,7 @@ namespace Bit.App.Pages if(!pushPromptShow) { _settings.AddOrUpdateValue(Constants.PushInitialPromptShown, true); - await _userDialogs.AlertAsync("bitwarden keeps your vault automatically synced by using push notifications." + _userDialogs.Alert("bitwarden keeps your vault automatically synced by using push notifications." + " For the best possible experience, please select \"Ok\" on the following prompt when asked to enable push notifications.", "Enable Automatic Syncing", "Ok, got it!"); } @@ -171,14 +171,14 @@ namespace Bit.App.Pages } } - private async Task FetchAndLoadVaultAsync() + private void FetchAndLoadVault() { if(PresentationFolders.Count > 0 && _syncService.SyncInProgress) { return; } - await Task.Run(async () => + Task.Run(async () => { var foldersTask = _folderService.GetAllAsync(); var sitesTask = _favorites ? _siteService.GetAllAsync(true) : _siteService.GetAllAsync();