@@ -509,19 +509,21 @@ class AppStateProvider extends ChangeNotifier {
509509 _gpsService.statusStream.listen ((status) {
510510 final previousStatus = _gpsStatus;
511511 _gpsStatus = status;
512- debugLog ('[GPS] Status changed: $previousStatus → $status ' );
513- debugLog ('[GPS] Post-change state: inZone=$_inZone , isCheckingZone=$_isCheckingZone , '
514- 'hasInternet=$_hasInternet , hasPosition=${_currentPosition != null }' );
515512
516- // Log when we transition to locked state (permission granted + GPS available)
517- if (status == GpsStatus .locked && previousStatus != GpsStatus .locked) {
518- debugLog ('[GPS] GPS lock acquired - zone check should trigger on first position' );
519- }
520- // Log when permission is denied or GPS disabled
521- if (status == GpsStatus .permissionDenied) {
522- debugLog ('[GPS] Location permission denied - zone checks will be blocked' );
523- } else if (status == GpsStatus .disabled) {
524- debugLog ('[GPS] Location services disabled - zone checks will be blocked' );
513+ // Only log when status actually changes
514+ if (previousStatus != status) {
515+ debugLog ('[GPS] Status changed: $previousStatus → $status ' );
516+
517+ // Log when we transition to locked state (permission granted + GPS available)
518+ if (status == GpsStatus .locked) {
519+ debugLog ('[GPS] GPS lock acquired - zone check should trigger on first position' );
520+ }
521+ // Log when permission is denied or GPS disabled
522+ if (status == GpsStatus .permissionDenied) {
523+ debugLog ('[GPS] Location permission denied - zone checks will be blocked' );
524+ } else if (status == GpsStatus .disabled) {
525+ debugLog ('[GPS] Location services disabled - zone checks will be blocked' );
526+ }
525527 }
526528 notifyListeners ();
527529 });
@@ -533,12 +535,6 @@ class AppStateProvider extends ChangeNotifier {
533535 _currentPosition = position;
534536 notifyListeners ();
535537
536- // Comprehensive diagnostic logging for debugging user issues
537- debugLog ('[GPS] Position received: ${position .latitude .toStringAsFixed (5 )}, ${position .longitude .toStringAsFixed (5 )} '
538- '(accuracy: ${position .accuracy .toStringAsFixed (1 )}m)' );
539- debugLog ('[GPS] Current state: inZone=$_inZone , isCheckingZone=$_isCheckingZone , '
540- 'hasInternet=$_hasInternet , offlineMode=${_preferences .offlineMode }, gpsStatus=$_gpsStatus ' );
541-
542538 // Check zone on first GPS lock (when _inZone is null)
543539 // Skip zone checks when offline mode is enabled
544540 if (_inZone == null && ! _preferences.offlineMode) {
0 commit comments