diff --git a/mobile/lib/shared/models/asset.dart b/mobile/lib/shared/models/asset.dart index f432dd2ee8..ca18475048 100644 --- a/mobile/lib/shared/models/asset.dart +++ b/mobile/lib/shared/models/asset.dart @@ -32,8 +32,16 @@ class Asset { double? get longitude => isLocal ? local!.longitude : remote!.exifInfo?.longitude?.toDouble(); - DateTime get createdAt => - isLocal ? local!.createDateTime : DateTime.parse(remote!.createdAt); + DateTime get createdAt { + if (isLocal) { + if (local!.createDateTime.year == 1970) { + return local!.modifiedDateTime; + } + return local!.createDateTime; + } else { + return DateTime.parse(remote!.createdAt); + } + } bool get isImage => isLocal ? local!.type == AssetType.image diff --git a/mobile/pubspec.lock b/mobile/pubspec.lock index 2870a23466..537d0d65f3 100644 --- a/mobile/pubspec.lock +++ b/mobile/pubspec.lock @@ -307,6 +307,11 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "0.4.0" + flutter_driver: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" flutter_hooks: dependency: "direct main" description: @@ -392,6 +397,11 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.1.2" + fuchsia_remote_debug_protocol: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" glob: dependency: transitive description: @@ -504,6 +514,11 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.5.0" + integration_test: + dependency: "direct dev" + description: flutter + source: sdk + version: "0.0.0" intl: dependency: "direct main" description: @@ -1041,6 +1056,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.1.1" + sync_http: + dependency: transitive + description: + name: sync_http + url: "https://pub.dartlang.org" + source: hosted + version: "0.3.1" synchronized: dependency: transitive description: @@ -1202,6 +1224,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.0.10" + vm_service: + dependency: transitive + description: + name: vm_service + url: "https://pub.dartlang.org" + source: hosted + version: "9.0.0" wakelock: dependency: transitive description: @@ -1251,6 +1280,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.2.0" + webdriver: + dependency: transitive + description: + name: webdriver + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.0" win32: dependency: transitive description: