1
0
Fork 0
mirror of https://github.com/Nioux/AideDeJeu.git synced 2025-10-29 14:35:45 +00:00

Corrections bouton back popup

This commit is contained in:
Yan Maniez 2019-12-07 18:06:51 +01:00
parent f1c8efa2a2
commit 5225145f67
2 changed files with 3 additions and 3 deletions

View file

@ -84,7 +84,7 @@ namespace AideDeJeu.Droid
// .SetMessage(Xamarin.Forms.Shell.Current.CurrentItem.Route)
// .SetTitle("OnBackPressed")
// .Show();
if (Xamarin.Forms.Shell.Current.Navigation.NavigationStack.Count == 1 && Xamarin.Forms.Shell.Current.CurrentItem.Route != "IMPL_home")
if (Xamarin.Forms.Shell.Current?.Navigation?.NavigationStack?.Count == 1 && Rg.Plugins.Popup.Services.PopupNavigation.Instance.PopupStack.Count == 0 && Xamarin.Forms.Shell.Current?.CurrentItem?.Route != "IMPL_home")
{
Xamarin.Forms.Shell.Current.GoToAsync("//home", true);
}
@ -93,7 +93,7 @@ namespace AideDeJeu.Droid
if (Rg.Plugins.Popup.Popup.SendBackPressed(base.OnBackPressed))
{
// Do something if there are some pages in the `PopupStack`
//Rg.Plugins.Popup.Services.PopupNavigation.Instance.PopAsync();
Rg.Plugins.Popup.Services.PopupNavigation.Instance.PopAsync();
}
else
{

View file

@ -186,7 +186,7 @@ namespace AideDeJeu.ViewModels
var repo = Main.Bookmarks;
var vm = new BookmarksViewModel();
var result = await Application.Current.MainPage.DisplayActionSheet("Ajouter à", "Annuler", "Nouvelle liste", repo.BookmarkCollectionNames.ToArray<string>());
if (result != "Annuler")
if (result != "Annuler" && result != null)
{
if (result == "Nouvelle liste")
{