Repository navigation
feat: Enhance navigation initialization for shell support in App class - #2093
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the App launch flow in the Uno.Extensions navigation template to change how navigation is initialized in OnLaunched, adding MainWindow.InitializeNavigationAsync(...) paths and adjusting initial navigation behavior when authentication is enabled.
Changes:
- Add a non-auth navigation initialization path using
MainWindow.InitializeNavigationAsync(..., initialRoute: "Main")under the non-shell branch. - Add an auth-aware initialization path using
MainWindow.InitializeNavigationAsync(..., initialNavigate: ...)under the non-shell branch, mirroring the existingbuilder.NavigateAsync(..., initialNavigate: ...)logic. - Add
#if (shell)branching around the existingbuilder.NavigateAsyncpaths.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
|
@copilot apply changes based on the comments in this thread |
…arning Agent-Logs-Url: https://github.com/unoplatform/uno.templates/sessions/44da0f78-a3e1-476b-b3a1-b653bef877a1 Co-authored-by: kazo0 <[email protected]>
|
|
Applied all changes from the review thread in commit 2d3bed5:
Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
This pull request updates the app launch logic in
App.recommended.csto improve how navigation is initialized, especially when using the shell template and authentication. The changes streamline navigation setup and ensure that the correct initial route or view model is loaded based on authentication status.Navigation initialization improvements:
MainWindow.InitializeNavigationAsync, specifying the initial route as "Main" for a clearer and more consistent startup experience.initialNavigatedelegate. This delegate checks authentication status and navigates to either the main or login view model accordingly, ensuring users are directed to the appropriate screen on launch.