Skip to content

Commit

Permalink
fix(mobile): fix null check operator on null value (immich-app#2204)
Browse files Browse the repository at this point in the history
  • Loading branch information
alextran1502 authored Apr 8, 2023
1 parent 1f17720 commit 9fc70fc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mobile/lib/shared/services/sync.service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 9fc70fc

Please sign in to comment.