Skip to content

High performance self-hosted photo and video management solution.

fix: null check (#21536)

Alex5ce946bb5bd0
diff --git a/mobile/lib/domain/services/local_sync.service.dart b/mobile/lib/domain/services/local_sync.service.dart
index b136b11bab..5ab10bdf09 100644
--- a/mobile/lib/domain/services/local_sync.service.dart
+++ b/mobile/lib/domain/services/local_sync.service.dart
@@ -286,7 +286,7 @@ extension on Iterable<PlatformAlbum> {
(e) => LocalAlbum(
id: e.id,
name: e.name,
- updatedAt: tryFromSecondsSinceEpoch(e.updatedAt!) ?? DateTime.now(),
+ updatedAt: tryFromSecondsSinceEpoch(e.updatedAt) ?? DateTime.now(),
assetCount: e.assetCount,
),
).toList();
@@ -301,8 +301,8 @@ extension on Iterable<PlatformAsset> {
name: e.name,
checksum: null,
type: AssetType.values.elementAtOrNull(e.type) ?? AssetType.other,
- createdAt: tryFromSecondsSinceEpoch(e.createdAt!) ?? DateTime.now(),
- updatedAt: tryFromSecondsSinceEpoch(e.updatedAt!) ?? DateTime.now(),
+ createdAt: tryFromSecondsSinceEpoch(e.createdAt) ?? DateTime.now(),
+ updatedAt: tryFromSecondsSinceEpoch(e.updatedAt) ?? DateTime.now(),
width: e.width,
height: e.height,
durationInSeconds: e.durationInSeconds,