diff --git a/mobile/.gitignore b/mobile/.gitignore index f643592c0..93d67bfee 100644 --- a/mobile/.gitignore +++ b/mobile/.gitignore @@ -53,4 +53,6 @@ ios/fastlane/report.xml # Isar default.isar default.isar.lock -libisar.so \ No newline at end of file +libisar.so +default.isar-lck +isar.dll \ No newline at end of file diff --git a/mobile/lib/shared/models/asset.dart b/mobile/lib/shared/models/asset.dart index ac5f6b2e9..4cfcea014 100644 --- a/mobile/lib/shared/models/asset.dart +++ b/mobile/lib/shared/models/asset.dart @@ -228,7 +228,6 @@ class Asset { bool canUpdate(Asset a) { assert(isInDb); assert(checksum == a.checksum); - assert(thumbhash == a.thumbhash); assert(a.storage != AssetState.merged); return a.updatedAt.isAfter(updatedAt) || a.isRemote && !isRemote || @@ -268,6 +267,7 @@ class Asset { livePhotoVideoId: livePhotoVideoId, isFavorite: isFavorite, isArchived: isArchived, + thumbhash: thumbhash, ); } } else { @@ -282,6 +282,7 @@ class Asset { // isFavorite + isArchived are not set by device-only assets isFavorite: a.isFavorite, isArchived: a.isArchived, + thumbhash: a.thumbhash, exifInfo: a.exifInfo?.copyWith(id: id) ?? exifInfo, ); } else { diff --git a/mobile/lib/utils/migration.dart b/mobile/lib/utils/migration.dart index 724f3a872..2356c7314 100644 --- a/mobile/lib/utils/migration.dart +++ b/mobile/lib/utils/migration.dart @@ -11,6 +11,8 @@ Future migrateDatabaseIfNeeded(Isar db) async { await _migrateTo(db, 2); case 2: await _migrateTo(db, 3); + case 3: + await _migrateTo(db, 4); } }