Skip to content

Fix stuck location message; say "Current location" instead of "GPS" - #86

Merged
timbortnik merged 1 commit into
mainfrom
fix/location-wording-and-snackbar
Nov 8, 2026
Merged

timbortnik merged 1 commit into
mainfrom
fix/location-wording-and-snackbar

Conversation

@timbortnik

Copy link
Copy Markdown
Owner

Reported on a Pixel (Android 17): turning Location off and tapping the GPS option showed "GPS permission denied…", and the message stayed on screen after Location was switched back on.

  • Since Flutter 3.38 a SnackBar with an action persists until tapped (SnackBar with action no longer auto-dismiss flutter/flutter#173084). Restore the pre-3.38 behaviour with persist: MediaQuery.accessibleNavigationOf(context): auto-dismiss, but keep it up for screen-reader users who need time to reach the action (a plain persist: false would take that away).
  • The message blamed permission even when the Location switch was off. requestGpsPermission() -> requestGpsAccess() returning GpsAccess {granted, serviceDisabled, permissionDenied}; show locationServicesOff (Settings -> system location settings) or locationPermissionDenied (Settings -> this app's settings page, new native openAppSettings).
  • Stop saying "GPS" to users: the app requests approximate location only, Android calls it "Location", and the Play disclosures say approximate. The picker option (hard-coded, untranslated 'GPS') and the chip label now use the existing, translated currentLocation string; locationSourceGps and gpsPermissionDenied are removed from all 36 ARB files; privacy policy wording updated. Internal names and stored keys (LocationSource.gps, use_gps, last_gps_*) are unchanged.
  • The chip is now one "city · label" text ellipsized at the end inside a Flexible, so the longer label is cut before the city and the row never overflows (worst case checked: Belarusian at 1.3x font).

New strings in 36 languages were drafted without native review.

Verified: make analyze, make test (164 Dart incl. 8 new + Kotlin), debug build, :app:lintDebug; on an API 30 emulator (be, 1.3x font): Location off -> "Location is off" message -> Location on -> message gone within 6 s; permission denied -> Settings opens app info. The two SnackBar tests each fail when the persist logic is broken.

Reported on a Pixel (Android 17): turning Location off and tapping the
GPS option showed "GPS permission denied…", and the message stayed on
screen after Location was switched back on.

- Since Flutter 3.38 a SnackBar with an action persists until tapped
  (flutter/flutter#173084). Restore the pre-3.38 behaviour with
  persist: MediaQuery.accessibleNavigationOf(context): auto-dismiss,
  but keep it up for screen-reader users who need time to reach the
  action (a plain persist: false would take that away).
- The message blamed permission even when the Location switch was off.
  requestGpsPermission() -> requestGpsAccess() returning GpsAccess
  {granted, serviceDisabled, permissionDenied}; show
  locationServicesOff (Settings -> system location settings) or
  locationPermissionDenied (Settings -> this app's settings page, new
  native openAppSettings).
- Stop saying "GPS" to users: the app requests approximate location
  only, Android calls it "Location", and the Play disclosures say
  approximate. The picker option (hard-coded, untranslated 'GPS') and
  the chip label now use the existing, translated currentLocation
  string; locationSourceGps and gpsPermissionDenied are removed from all
  36 ARB files; privacy policy wording updated. Internal names and
  stored keys (LocationSource.gps, use_gps, last_gps_*) are unchanged.
- The chip is now one "city · label" text ellipsized at the end inside
  a Flexible, so the longer label is cut before the city and the row
  never overflows (worst case checked: Belarusian at 1.3x font).

New strings in 36 languages were drafted without native review.

Verified: make analyze, make test (164 Dart incl. 8 new + Kotlin),
debug build, :app:lintDebug; on an API 30 emulator (be, 1.3x font):
Location off -> "Location is off" message -> Location on -> message
gone within 6 s; permission denied -> Settings opens app info. The two
SnackBar tests each fail when the persist logic is broken.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity · 6 duplication

Metric Results
Complexity 0
Duplication 6

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@timbortnik
timbortnik merged commit 9d8bf30 into main Nov 8, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant