Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Test MediaStore modification time fallback

Neeraj Gupta4dd61eb9b902
diff --git a/mobile/apps/photos/test/module/metadata/photo_test.dart b/mobile/apps/photos/test/module/metadata/photo_test.dart
index 4efe53b81a..34a1db1c96 100644
--- a/mobile/apps/photos/test/module/metadata/photo_test.dart
+++ b/mobile/apps/photos/test/module/metadata/photo_test.dart
@@ -35,6 +35,31 @@ void main() {
expect(file.metadataVersion, -1);
});
+ test("keeps an earlier MediaStore modification time without EXIF", () {
+ final file = fileFromAsset(
+ "EnteThumbnailBench",
+ AssetEntity(
+ id: "bench",
+ typeInt: 1,
+ width: 4032,
+ height: 3024,
+ title: "bench-IMG_8606_rotate_90_cw_contains_text.HEIC",
+ createDateSecond: 1786506608,
+ modifiedDateSecond: 1786450130,
+ ),
+ );
+
+ expect(
+ file.creationTime,
+ 1786450130 * Duration.microsecondsPerSecond,
+ );
+ applyCreationTimeMetadata(file, null);
+ expect(
+ file.creationTime,
+ 1786450130 * Duration.microsecondsPerSecond,
+ );
+ });
+
test(
"refined dimensions invalidate the model cache and preserve other fields",
() {