fix(map): location perms and button visibility, breadcrumb taps#4651
Merged
jamesarich merged 4 commits intomainfrom Feb 26, 2026
Merged
fix(map): location perms and button visibility, breadcrumb taps#4651jamesarich merged 4 commits intomainfrom
jamesarich merged 4 commits intomainfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4651 +/- ##
=======================================
Coverage 15.36% 15.36%
=======================================
Files 83 83
Lines 4342 4342
Branches 734 734
=======================================
Hits 667 667
Misses 3551 3551
Partials 124 124 ☔ View full report in Codecov by Sentry. |
7863c1b to
d7fc8d3
Compare
This commit refactors the location permission handling logic within the map feature for both Google and F-Droid variants. The changes streamline the process by requesting location permissions only when the user attempts to enable location tracking, rather than relying on a pre-fetched permission state. This improves the user experience by moving the permission request to the point of use. Specific changes: - Remove the `hasLocationPermission` state and related handlers. - Use Accompanist's `rememberMultiplePermissionsState` to manage and request location permissions directly. - Trigger the location permission request when the "My Location" button is tapped if permissions have not been granted. - Automatically enable location tracking after the user grants the necessary permissions.
Only show the user's location on the map if both location permissions are granted and location tracking is enabled in the settings.
Adjusted the `zIndex` for traceroute polylines and node track markers to ensure they are rendered in the correct order on the map. Additionally, this commit implements the node track history feature for the F-Droid map view, displaying historical positions and paths for a selected node.
d7fc8d3 to
d0f3fca
Compare
Signed-off-by: James Rich <[email protected]>
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 introduces enhancements to the map feature, primarily focusing on improved track visualization, location permissions handling, and UI updates for both FDroid and Google map implementations. The most important changes are grouped below by theme.
Track Visualization Enhancements:
MapView(feature/map/src/fdroid/kotlin/org/meshtastic/feature/map/MapView.kt). [1] [2]updateMarkersfunction to handle new track overlays, ensuring proper addition and removal of track markers and polylines.Location Permissions Handling:
hasGpschecks in both FDroid and Google map implementations. [1] [2] [3]UI and Map Overlay Improvements:
MapButtonand dropdown menu to usestringResourcefor content descriptions, improving accessibility and localization.Code Cleanup and Refactoring:
hasGpsvariable and redundant conditionals, to simplify logic and improve maintainability. [1] [2] [3]API and Parameter Updates:
focusedNodeNum,nodeTracks) toMapViewcomposable for more flexible track visualization.These changes collectively improve map interaction, visualization of node movement, and user experience regarding location permissions and overlays.