mirror of
https://github.com/FoggedLens/deflock-app.git
synced 2026-07-06 04:37:56 +02:00
Suspected location localizations, credit alprwatch
This commit is contained in:
@@ -160,15 +160,9 @@ class SuspectedLocationCache extends ChangeNotifier {
|
||||
validCount++;
|
||||
} else {
|
||||
zeroCoordCount++;
|
||||
if (i < 3) { // Log first few zero coord cases
|
||||
debugPrint('[SuspectedLocationCache] Row $i has zero coordinates: ticket=${rowData['ticket_no']}, location=${rowData['location']?.toString().length} chars');
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
errorCount++;
|
||||
if (errorCount <= 5) { // Log first few errors
|
||||
debugPrint('[SuspectedLocationCache] Row $i error: $e, ticket=${rowData['ticket_no']}');
|
||||
}
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ class SuspectedLocationService {
|
||||
factory SuspectedLocationService() => _instance;
|
||||
SuspectedLocationService._();
|
||||
|
||||
static const String _csvUrl = 'https://alprwatch.org/pub/flock_utilities_mini_2025-10-06.csv';
|
||||
static const String _csvUrl = 'https://alprwatch.org/pub/flock_utilities_mini_latest.csv';
|
||||
static const String _prefsKeyEnabled = 'suspected_locations_enabled';
|
||||
static const Duration _maxAge = Duration(days: 7);
|
||||
static const Duration _timeout = Duration(seconds: 30);
|
||||
@@ -187,9 +187,8 @@ class SuspectedLocationService {
|
||||
validRows++;
|
||||
}
|
||||
|
||||
// Log progress every 1000 rows and report to UI
|
||||
// Report progress every 1000 rows
|
||||
if (rowIndex % 1000 == 0) {
|
||||
debugPrint('[SuspectedLocationService] Processing row $rowIndex...');
|
||||
final progress = 0.4 + (rowIndex / dataRows.length) * 0.4; // 40% to 80% of total
|
||||
onProgress?.call('Processing row $rowIndex...', progress);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user