public async void OnScanResult() { Page connectPage = Navigation.NavigationStack.LastOrDefault(); await RestaurantDatabase.Connect(QrCodeResultText); MenuList = RestaurantDatabase.GetMenu(); await Navigation.PushAsync(new MenuPage(MenuList)); Navigation.RemovePage(connectPage); }
public async void OnScanResult() { if (App.Current.MainPage.Navigation.ModalStack.Count > 0) { await Navigation.PopModalAsync(); await RestaurantDatabase.Connect(QrCodeResultText); homePageViewModel.Menu = RestaurantDatabase.GetMenu(); MessagingCenter.Send(this, Constants.RestaurantConnectedEventName); OnConnectViewUpdate(); } }