Skip to content
This repository has been archived by the owner on Oct 18, 2023. It is now read-only.

Bugfix/navigation to other page fix #136

Merged
merged 3 commits into from
Mar 31, 2020
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions samples/src/PopupPluginSample/Views/PopupView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<popup:PopupPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:popup="clr-namespace:Rg.Plugins.Popup.Pages;assembly=Rg.Plugins.Popup"
xmlns:prism="clr-namespace:Prism.Mvvm;assembly=Prism.Forms"
xmlns:prism="http://prismlibrary.com"
prism:ViewModelLocator.AutowireViewModel="True"
Padding="100"
x:Class="PopupPluginSample.Views.PopupView">
Expand All @@ -13,5 +13,7 @@
BackgroundColor="White">
<Label Text="{Binding Message}" />
<Button Text="Navigate Back" Command="{Binding NavigateBackCommand}" />
</StackLayout>
<Button Text="Navigate to Menu Page"
Command="{prism:NavigateTo '/MenuPage'}" />
</StackLayout>
</popup:PopupPage>
4 changes: 4 additions & 0 deletions src/Prism.Plugin.Popups/PopupPageNavigationService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,11 @@ protected override async Task DoPush(Page currentPage, Page page, bool? useModal
break;
default:
if (_popupNavigation.PopupStack.Any())
{
await _popupNavigation.PopAllAsync(animated);
currentPage = _applicationProvider.MainPage;
ksevery marked this conversation as resolved.
Show resolved Hide resolved
}

await base.DoPush(currentPage, page, useModalNavigation, animated, insertBeforeLast, navigationOffset);
break;
}
Expand Down