1
0
mirror of https://github.com/immich-app/immich.git synced 2025-08-07 23:03:36 +02:00

fix(web): new feature photo (#9443)

* fix: new feature photo

* fix: use updatedAt
This commit is contained in:
martin
2024-06-28 02:16:26 +02:00
committed by GitHub
parent 325aa1d392
commit 37b5d92110
18 changed files with 89 additions and 31 deletions

View File

@ -19,6 +19,7 @@ class PersonWithFacesResponseDto {
required this.isHidden,
required this.name,
required this.thumbnailPath,
this.updatedAt,
});
DateTime? birthDate;
@ -33,6 +34,15 @@ class PersonWithFacesResponseDto {
String thumbnailPath;
/// This property was added in v1.107.0
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
DateTime? updatedAt;
@override
bool operator ==(Object other) => identical(this, other) || other is PersonWithFacesResponseDto &&
other.birthDate == birthDate &&
@ -40,7 +50,8 @@ class PersonWithFacesResponseDto {
other.id == id &&
other.isHidden == isHidden &&
other.name == name &&
other.thumbnailPath == thumbnailPath;
other.thumbnailPath == thumbnailPath &&
other.updatedAt == updatedAt;
@override
int get hashCode =>
@ -50,10 +61,11 @@ class PersonWithFacesResponseDto {
(id.hashCode) +
(isHidden.hashCode) +
(name.hashCode) +
(thumbnailPath.hashCode);
(thumbnailPath.hashCode) +
(updatedAt == null ? 0 : updatedAt!.hashCode);
@override
String toString() => 'PersonWithFacesResponseDto[birthDate=$birthDate, faces=$faces, id=$id, isHidden=$isHidden, name=$name, thumbnailPath=$thumbnailPath]';
String toString() => 'PersonWithFacesResponseDto[birthDate=$birthDate, faces=$faces, id=$id, isHidden=$isHidden, name=$name, thumbnailPath=$thumbnailPath, updatedAt=$updatedAt]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
@ -67,6 +79,11 @@ class PersonWithFacesResponseDto {
json[r'isHidden'] = this.isHidden;
json[r'name'] = this.name;
json[r'thumbnailPath'] = this.thumbnailPath;
if (this.updatedAt != null) {
json[r'updatedAt'] = this.updatedAt!.toUtc().toIso8601String();
} else {
// json[r'updatedAt'] = null;
}
return json;
}
@ -84,6 +101,7 @@ class PersonWithFacesResponseDto {
isHidden: mapValueOfType<bool>(json, r'isHidden')!,
name: mapValueOfType<String>(json, r'name')!,
thumbnailPath: mapValueOfType<String>(json, r'thumbnailPath')!,
updatedAt: mapDateTime(json, r'updatedAt', r''),
);
}
return null;