Back navigation and shell improvements.
This commit is contained in:
@@ -77,9 +77,6 @@ public sealed partial class SettingsPage : SettingsPageAbstract,
|
||||
// Unregister frame navigation event
|
||||
SettingsFrame.Navigated -= SettingsFrameNavigated;
|
||||
|
||||
// Reset navigation state when leaving SettingsPage
|
||||
ViewModel.StatePersistenceService.HasCurrentModeBackStack = false;
|
||||
|
||||
base.OnNavigatingFrom(e);
|
||||
}
|
||||
|
||||
@@ -225,9 +222,11 @@ public sealed partial class SettingsPage : SettingsPageAbstract,
|
||||
|
||||
private void UpdateBackNavigationState()
|
||||
{
|
||||
ViewModel.StatePersistenceService.HasCurrentModeBackStack = PageHistory.Count > 1 && SettingsFrame.CanGoBack;
|
||||
WeakReferenceMessenger.Default.Send(new TitleBarShellContentUpdated());
|
||||
}
|
||||
|
||||
public bool CanNavigateBack => PageHistory.Count > 1 && SettingsFrame.CanGoBack;
|
||||
|
||||
private async Task RefreshCurrentPageStateAsync()
|
||||
{
|
||||
var activePage = PageHistory.LastOrDefault()?.Request.PageType ?? WinoPage.SettingOptionsPage;
|
||||
|
||||
@@ -157,7 +157,6 @@ public sealed partial class WinoAppShell : Views.Abstract.WinoAppShellAbstract,
|
||||
|
||||
private void ResetShellModeNavigationState()
|
||||
{
|
||||
ViewModel.StatePersistenceService.HasCurrentModeBackStack = false;
|
||||
InnerShellFrame.BackStack.Clear();
|
||||
InnerShellFrame.ForwardStack.Clear();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user