log fix
This commit is contained in:
parent
801cdf2897
commit
066bff3faf
1 changed files with 6 additions and 5 deletions
|
@ -59,13 +59,14 @@ class MediaStoreSource extends CollectionSource {
|
|||
await vaults.init();
|
||||
await favourites.init();
|
||||
await covers.init();
|
||||
final currentTimeZoneOffset = DateTime.now().timeZoneOffset.inMilliseconds;
|
||||
final catalogTimeZoneOffset = settings.catalogTimeZoneOffsetMillis;
|
||||
if (currentTimeZoneOffset != catalogTimeZoneOffset) {
|
||||
unawaited(reportService.recordError('Time zone offset change: $currentTimeZoneOffset -> $catalogTimeZoneOffset. Clear catalog metadata to get correct date/times.'));
|
||||
|
||||
final deviceOffset = DateTime.now().timeZoneOffset.inMilliseconds;
|
||||
final catalogOffset = settings.catalogTimeZoneOffsetMillis;
|
||||
if (deviceOffset != catalogOffset) {
|
||||
unawaited(reportService.recordError('Time zone offset change: $catalogOffset -> $deviceOffset. Clear catalog metadata to get correct date/times.'));
|
||||
await localMediaDb.clearDates();
|
||||
await localMediaDb.clearCatalogMetadata();
|
||||
settings.catalogTimeZoneOffsetMillis = currentTimeZoneOffset;
|
||||
settings.catalogTimeZoneOffsetMillis = deviceOffset;
|
||||
}
|
||||
await loadDates();
|
||||
debugPrint('$runtimeType load essentials complete in ${stopwatch.elapsed.inMilliseconds}ms');
|
||||
|
|
Loading…
Reference in a new issue