diff --git a/ZicMoove/ZicMoove/App.xaml.cs b/ZicMoove/ZicMoove/App.xaml.cs index 783dc231..ea3bdf16 100644 --- a/ZicMoove/ZicMoove/App.xaml.cs +++ b/ZicMoove/ZicMoove/App.xaml.cs @@ -334,7 +334,7 @@ namespace ZicMoove public static Task DisplayAlert(string title, string message, string yes = "OK", string no = null) { - var currentPage = ((NavigationPage)Current.MainPage).CurrentPage; + var currentPage = Navigation.NavigationStack.Last(); if (no == null) { return currentPage.DisplayAlert(title, message, yes).ContinueWith(task => true);