mirror of
https://github.com/KevinMidboe/immich.git
synced 2025-10-29 17:40:28 +00:00
feat(web): Add album sorting to albums view (#2861)
* Add album sorting to web albums view * generate api --------- Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
This commit is contained in:
23
mobile/openapi/lib/model/album_response_dto.dart
generated
23
mobile/openapi/lib/model/album_response_dto.dart
generated
@@ -24,6 +24,7 @@ class AlbumResponseDto {
|
||||
this.sharedUsers = const [],
|
||||
this.assets = const [],
|
||||
required this.owner,
|
||||
this.lastModifiedAssetTimestamp,
|
||||
});
|
||||
|
||||
int assetCount;
|
||||
@@ -48,6 +49,14 @@ class AlbumResponseDto {
|
||||
|
||||
UserResponseDto owner;
|
||||
|
||||
///
|
||||
/// 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? lastModifiedAssetTimestamp;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is AlbumResponseDto &&
|
||||
other.assetCount == assetCount &&
|
||||
@@ -60,7 +69,8 @@ class AlbumResponseDto {
|
||||
other.shared == shared &&
|
||||
other.sharedUsers == sharedUsers &&
|
||||
other.assets == assets &&
|
||||
other.owner == owner;
|
||||
other.owner == owner &&
|
||||
other.lastModifiedAssetTimestamp == lastModifiedAssetTimestamp;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
@@ -75,10 +85,11 @@ class AlbumResponseDto {
|
||||
(shared.hashCode) +
|
||||
(sharedUsers.hashCode) +
|
||||
(assets.hashCode) +
|
||||
(owner.hashCode);
|
||||
(owner.hashCode) +
|
||||
(lastModifiedAssetTimestamp == null ? 0 : lastModifiedAssetTimestamp!.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'AlbumResponseDto[assetCount=$assetCount, id=$id, ownerId=$ownerId, albumName=$albumName, createdAt=$createdAt, updatedAt=$updatedAt, albumThumbnailAssetId=$albumThumbnailAssetId, shared=$shared, sharedUsers=$sharedUsers, assets=$assets, owner=$owner]';
|
||||
String toString() => 'AlbumResponseDto[assetCount=$assetCount, id=$id, ownerId=$ownerId, albumName=$albumName, createdAt=$createdAt, updatedAt=$updatedAt, albumThumbnailAssetId=$albumThumbnailAssetId, shared=$shared, sharedUsers=$sharedUsers, assets=$assets, owner=$owner, lastModifiedAssetTimestamp=$lastModifiedAssetTimestamp]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
@@ -97,6 +108,11 @@ class AlbumResponseDto {
|
||||
json[r'sharedUsers'] = this.sharedUsers;
|
||||
json[r'assets'] = this.assets;
|
||||
json[r'owner'] = this.owner;
|
||||
if (this.lastModifiedAssetTimestamp != null) {
|
||||
json[r'lastModifiedAssetTimestamp'] = this.lastModifiedAssetTimestamp!.toUtc().toIso8601String();
|
||||
} else {
|
||||
// json[r'lastModifiedAssetTimestamp'] = null;
|
||||
}
|
||||
return json;
|
||||
}
|
||||
|
||||
@@ -130,6 +146,7 @@ class AlbumResponseDto {
|
||||
sharedUsers: UserResponseDto.listFromJson(json[r'sharedUsers']),
|
||||
assets: AssetResponseDto.listFromJson(json[r'assets']),
|
||||
owner: UserResponseDto.fromJson(json[r'owner'])!,
|
||||
lastModifiedAssetTimestamp: mapDateTime(json, r'lastModifiedAssetTimestamp', ''),
|
||||
);
|
||||
}
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user