public App() { #if DEBUG HotReloader.Current.Run(this); #endif MainPage = new NavigationPage(); AppMainPage = MainPage as NavigationPage; ContentPage = new ContentListPage(AppMainPage) { BindingContext = new ContentListPageViewModel(new DialogService()) }; AppMainPage.PushAsync(ContentPage); }
private static async Task LoadUrlImpl(string url) { Logger.Info(""); while (true) { if (AppMainPage.CurrentPage is IContentPayloadHandler handler && await handler.HandleUrl(url)) { return; } var page = await AppMainPage.PopAsync(); if (page == null) { await(new DialogService()).ShowError( "Could not find content with url: " + url + ". Returning to the main page.", "Could not find content. ", "OK", null); await AppMainPage.PushAsync(ContentPage); return; } } }