refactor: navigation state - #44
Merged
Merged
Conversation
…ted-entry, and Entries-local editor navigation state
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Several navigation paths are incomplete, including external/new-entry deep links, wide-layout actions, and draft recovery edge cases.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 4
| var pendingDeletedEntries by remember { mutableStateOf<List<DiaryEntry>>(emptyList()) } | ||
| var pendingDeletedEntryLinks by remember { mutableStateOf<List<MomentEntryLink>>(emptyList()) } | ||
| var requestedEntryFromMoments by rememberSaveable { mutableStateOf<String?>(null) } | ||
| var restoredNewDraft by rememberSaveable { mutableStateOf(false) } |
Comment on lines
+542
to
+545
| deepLinks = listOf( | ||
| navDeepLink { | ||
| uriPattern = "markday://entry/{syncId}" | ||
| }, |
Comment on lines
+567
to
+568
| composable<NewEntryRoute> { backStackEntry -> | ||
| val route = backStackEntry.toRoute<NewEntryRoute>() |
Comment on lines
+42
to
+46
| if (route is EntryDetailsRoute && entry == null) { | ||
| Box(Modifier.fillMaxSize(), contentAlignment = Alignment.Center) { | ||
| Text("This entry is no longer available.") | ||
| } | ||
| return |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

This pull request refactors the main application navigation and screen management in
App.ktto use a more robust, route-based navigation system. It removes legacy state variables and navigation logic, replacing them with route-aware navigation and back stack handling. The changes also introduce deep linking for entry details and new entry creation, and unify navigation logic for better maintainability and clarity.