From 0aa1359ad416d88c5bc694dcf4304f0da11e9017 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Thu, 30 May 2019 18:27:57 -0400 Subject: [PATCH] use current.mainpage --- src/App/App.xaml.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/App/App.xaml.cs b/src/App/App.xaml.cs index 0d0174ef8..b1f3fc896 100644 --- a/src/App/App.xaml.cs +++ b/src/App/App.xaml.cs @@ -75,12 +75,12 @@ namespace Bit.App { if(!string.IsNullOrWhiteSpace(details.CancelText)) { - confirmed = await MainPage.DisplayAlert(details.Title, details.Text, confirmText, + confirmed = await Current.MainPage.DisplayAlert(details.Title, details.Text, confirmText, details.CancelText); } else { - await MainPage.DisplayAlert(details.Title, details.Text, confirmText); + await Current.MainPage.DisplayAlert(details.Title, details.Text, confirmText); } _messagingService.Send("showDialogResolve", new Tuple(details.DialogId, confirmed)); }); @@ -88,7 +88,7 @@ namespace Bit.App else if(message.Command == "locked") { await _stateService.PurgeAsync(); - Device.BeginInvokeOnMainThread(() => MainPage = new NavigationPage(new LockPage())); + Device.BeginInvokeOnMainThread(() => Current.MainPage = new NavigationPage(new LockPage())); } else if(message.Command == "lockVault") { @@ -182,7 +182,7 @@ namespace Bit.App { // TODO: Toast? } - MainPage = new HomePage(); + Current.MainPage = new HomePage(); }); } @@ -280,7 +280,7 @@ namespace Bit.App InitializeComponent(); SetCulture(); ThemeManager.SetTheme(); - MainPage = new HomePage(); + Current.MainPage = new HomePage(); var mainPageTask = SetMainPageAsync(); ServiceContainer.Resolve("platformUtilsService").Init(); }