From f71f2caa0cdbcac54ec12678186a61adfbd19065 Mon Sep 17 00:00:00 2001 From: StuartFerguson Date: Mon, 25 May 2026 11:42:35 +0100 Subject: [PATCH] Refactor AppShell navigation and clean up route registration Removed commented LoginPage route registration. Refactored AppShell navigation by making OnNavigating synchronous and removing the OnNavigated override for simpler event handling. --- TransactionProcessor.Mobile/App.xaml.cs | 1 - TransactionProcessor.Mobile/AppShell.xaml.cs | 9 +-------- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/TransactionProcessor.Mobile/App.xaml.cs b/TransactionProcessor.Mobile/App.xaml.cs index 6353c446..51a6ef0a 100644 --- a/TransactionProcessor.Mobile/App.xaml.cs +++ b/TransactionProcessor.Mobile/App.xaml.cs @@ -174,7 +174,6 @@ public App(IApplicationThemeService applicationThemeService) RegisterRouteOnce(nameof(BillPaymentSuccessPage), typeof(BillPaymentSuccessPage)); RegisterRouteOnce(nameof(BillPaymentFailedPage), typeof(BillPaymentFailedPage)); RegisterRouteOnce(nameof(AdminPage), typeof(AdminPage)); - //RegisterRouteOnce(nameof(LoginPage), typeof(LoginPage)); RegisterRouteOnce(nameof(ViewLogsPage), typeof(ViewLogsPage)); diff --git a/TransactionProcessor.Mobile/AppShell.xaml.cs b/TransactionProcessor.Mobile/AppShell.xaml.cs index ab2f0046..900f9475 100644 --- a/TransactionProcessor.Mobile/AppShell.xaml.cs +++ b/TransactionProcessor.Mobile/AppShell.xaml.cs @@ -10,7 +10,7 @@ public AppShell() InitializeComponent(); } - protected override async void OnNavigating(ShellNavigatingEventArgs args) + protected override void OnNavigating(ShellNavigatingEventArgs args) { base.OnNavigating(args); if (args.Source == ShellNavigationSource.ShellSectionChanged) @@ -28,12 +28,5 @@ protected override async void OnNavigating(ShellNavigatingEventArgs args) } } } - - protected override void OnNavigated(ShellNavigatedEventArgs args) - { - //Logger.LogDebug($"In OnNavigated - Source [{args.Source.ToString()}] {JsonConvert.SerializeObject(args)}"); - - base.OnNavigated(args); - } } }