Back navigation and shell improvements.

This commit is contained in:
Burak Kaan Köse
2026-03-24 18:05:09 +01:00
parent d699818c6f
commit 27c90d2f89
10 changed files with 96 additions and 86 deletions
+3 -4
View File
@@ -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();
}