Skip to content

feat: enhance map navigation and waypoint handling#4814

Merged
jamesarich merged 1 commit intomainfrom
fix/regressions
Mar 16, 2026
Merged

feat: enhance map navigation and waypoint handling#4814
jamesarich merged 1 commit intomainfrom
fix/regressions

Conversation

@jamesarich
Copy link
Copy Markdown
Collaborator

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

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]>
@github-actions github-actions bot added the bugfix PR tag label Mar 16, 2026
@jamesarich jamesarich enabled auto-merge March 16, 2026 13:07
@jamesarich jamesarich added this pull request to the merge queue Mar 16, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 16, 2026

Codecov Report

❌ Patch coverage is 0% with 16 lines in your changes missing coverage. Please review.
✅ Project coverage is 12.22%. Comparing base (6d132ed) to head (176a482).
⚠️ Report is 13 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...rg/meshtastic/feature/map/node/NodeMapViewModel.kt 0.00% 8 Missing ⚠️
...rg/meshtastic/app/map/prefs/map/GoogleMapsPrefs.kt 0.00% 6 Missing ⚠️
...g/meshtastic/feature/messaging/MessageViewModel.kt 0.00% 2 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Mar 16, 2026
@jamesarich jamesarich added this pull request to the merge queue Mar 16, 2026
Merged via the queue into main with commit 5edb8ab Mar 16, 2026
6 of 7 checks passed
@jamesarich jamesarich deleted the fix/regressions branch March 16, 2026 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix PR tag

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Individual node history map just shows standard global node map [Bug]: Pressing back from conversatio crashes the app

1 participant