mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
fix(mobile) invalid creation time on local asset show 1970 as year (#1391)
This commit is contained in:
parent
83271bb11e
commit
171ba84741
2 changed files with 46 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue