-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Fix: Explore map does not refresh after enabling location #6600
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
Hi, @Inuth0603 |
Hi @rohit9625, apologies for skipping that step! I have just commented on the issue requesting assignment. Thanks for guiding me. |
|
No problem :) |
- Added hadLocationPermissionOnPause field to track permission state - Only refresh map when permission changes from denied to granted - Prevents unnecessary refreshes during normal app lifecycle events
|
On a fresh install, as soon as I open the Explore map, I get the permissions dialog. I choose allow this time. However, it doesn't take me to my current location. |
- Added isWaitingForFirstLocation flag to track when waiting for first GPS fix - Updated handleLocationUpdate to center map when first location arrives - Modified locationPermissionGranted to wait for location instead of calling onMapReady immediately - Fixes issue where map doesn't center on first-time permission grant
@RitikaPahwa4444 Thanks for catching that! I've pushed a fix for the first-time permission grant issue. The problem was: When users grant permission for the first time via the in-app dialog, The fix:
This should now work for both scenarios: Could you test again when you get a chance? You can test by:
Thanks for the thorough testing! 🙏 |
|
✅ Generated APK variants! |
Fixes #6599
Changes
onPauseandonResumewithinExploreMapFragment.kt.Testing
Technical Approach
The fix tracks permission state across the pause/resume lifecycle using a boolean flag (
hadLocationPermissionOnPause). This prevents the common issue where checking permissions inonResume()triggers refreshes on every app resume, not just when permissions actually change.