From 9fc70fc24efba7da7613d42c0892211067dc18d2 Mon Sep 17 00:00:00 2001 From: Alex Date: Fri, 7 Apr 2023 21:21:29 -0500 Subject: [PATCH] fix(mobile): fix null check operator on null value (#2204) --- mobile/lib/shared/services/sync.service.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mobile/lib/shared/services/sync.service.dart b/mobile/lib/shared/services/sync.service.dart index 35b70f016e..a6da152b31 100644 --- a/mobile/lib/shared/services/sync.service.dart +++ b/mobile/lib/shared/services/sync.service.dart @@ -447,7 +447,7 @@ class SyncService { deleteCandidates.addAll(toDelete); existing.addAll(result.first); album.name = ape.name; - album.modifiedAt = ape.lastModified!; + album.modifiedAt = ape.lastModified ?? DateTime.now(); if (album.thumbnail.value != null && toDelete.contains(album.thumbnail.value)) { album.thumbnail.value = null; @@ -491,7 +491,7 @@ class SyncService { if (totalOnDevice != album.assets.length + newAssets.length) { return false; } - album.modifiedAt = ape.lastModified!.toUtc(); + album.modifiedAt = ape.lastModified?.toUtc() ?? DateTime.now().toUtc(); final result = await _linkWithExistingFromDb(newAssets); try { await _db.writeTxn(() async {