feat: enhance map navigation and waypoint handling#4814
Merged
jamesarich merged 1 commit intomainfrom Mar 16, 2026
Merged
Conversation
This commit improves the map and navigation experience by implementing direct waypoint focusing, refining backstack management, and fixing navigation state issues across the app.
Specific changes include:
- **Map & Waypoints**:
- Added `waypointId` support to `MapViewProvider` and both Google and F-Droid `MapViewModel` implementations.
- Implemented auto-centering and zooming to a specific waypoint on the map when a `waypointId` is provided.
- Fixed a `ClassCastException` in `GoogleMapsPrefs` when migrating camera target coordinates from older preference formats.
- **Navigation & Lifecycle**:
- Updated `Main` navigation logic to properly reset the backstack when switching between top-level destinations (Nodes and Conversations).
- Fixed an issue where `isFromDifferentGraph` was incorrectly calculated due to a null check in `AdaptiveContactsScreen` and `AdaptiveNodeListScreen`.
- Added `setDestNum` and `setContactKey` to their respective ViewModels to ensure correct state initialization when navigating directly to details screens.
- **Node Map**:
- Refactored `NodeMapViewModel` to use a reactive flow for `destNum`, allowing for manual updates and better handling of destination changes.
- **Messaging**:
- Added `setContactKey` to `MessageViewModel` to ensure the correct message thread is loaded when navigating from the contacts graph.
fixes #4801
fixes #4811
Signed-off-by: James Rich <[email protected]>
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #4814 +/- ##
==========================================
- Coverage 12.23% 12.22% -0.01%
==========================================
Files 530 530
Lines 17753 17762 +9
Branches 2652 2654 +2
==========================================
Hits 2172 2172
- Misses 15267 15276 +9
Partials 314 314 ☔ View full report in Codecov by Sentry. |
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 commit improves the map and navigation experience by implementing direct waypoint focusing, refining backstack management, and fixing navigation state issues across the app.
Specific changes include:
waypointIdsupport toMapViewProviderand both Google and F-DroidMapViewModelimplementations.waypointIdis provided.ClassCastExceptioninGoogleMapsPrefswhen migrating camera target coordinates from older preference formats.Mainnavigation logic to properly reset the backstack when switching between top-level destinations (Nodes and Conversations).isFromDifferentGraphwas incorrectly calculated due to a null check inAdaptiveContactsScreenandAdaptiveNodeListScreen.setDestNumandsetContactKeyto their respective ViewModels to ensure correct state initialization when navigating directly to details screens.NodeMapViewModelto use a reactive flow fordestNum, allowing for manual updates and better handling of destination changes.setContactKeytoMessageViewModelto ensure the correct message thread is loaded when navigating from the contacts graph.fixes #4801
fixes #4811