From bd993ff47bd90dae8540b085b4b38202db0a56a1 Mon Sep 17 00:00:00 2001 From: Michael Gordeev Date: Mon, 24 Dec 2018 20:27:55 +0300 Subject: [PATCH] Fixed some initialization issues Related Work Items: #216 --- FoxTube/Classes/SecretsVault.cs | 2 +- FoxTube/Pages/MainPage.xaml.cs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/FoxTube/Classes/SecretsVault.cs b/FoxTube/Classes/SecretsVault.cs index 295ee2b..707599e 100644 --- a/FoxTube/Classes/SecretsVault.cs +++ b/FoxTube/Classes/SecretsVault.cs @@ -150,7 +150,7 @@ namespace FoxTube } catch { - AuthorizationStateChanged?.Invoke(args: null); + AuthorizationStateChanged?.Invoke(args: new bool?[] { null }); } } diff --git a/FoxTube/Pages/MainPage.xaml.cs b/FoxTube/Pages/MainPage.xaml.cs index d6cfe77..c326a6b 100644 --- a/FoxTube/Pages/MainPage.xaml.cs +++ b/FoxTube/Pages/MainPage.xaml.cs @@ -64,8 +64,6 @@ namespace FoxTube SecretsVault.CheckAuthorization(); SecretsVault.CheckAddons(); - DownloadAgent.Initialize(); - SetTitleBar(); } @@ -229,7 +227,6 @@ namespace FoxTube { Methods.CloseApp(); })); - dialog.Commands.Add(new UICommand("Close")); dialog.CancelCommandIndex = 1; dialog.DefaultCommandIndex = 0; @@ -237,6 +234,9 @@ namespace FoxTube await dialog.ShowAsync(); } + if(e[0] as bool? != null) + DownloadAgent.Initialize(); + content.Navigate(typeof(Home)); if (videoPlaceholder.Content != null)