mirror of
https://github.com/immich-app/immich.git
synced 2025-12-06 19:13:54 +09:00
feat: user preferences for archive download size (#10296)
* feat: user preferences for archive download size * chore: open api * chore: clean up --------- Co-authored-by: Jason Rasmussen <jrasm91@gmail.com>
This commit is contained in:
@@ -14,12 +14,15 @@ class UserPreferencesResponseDto {
|
||||
/// Returns a new [UserPreferencesResponseDto] instance.
|
||||
UserPreferencesResponseDto({
|
||||
required this.avatar,
|
||||
required this.download,
|
||||
required this.emailNotifications,
|
||||
required this.memories,
|
||||
});
|
||||
|
||||
AvatarResponse avatar;
|
||||
|
||||
DownloadResponse download;
|
||||
|
||||
EmailNotificationsResponse emailNotifications;
|
||||
|
||||
MemoryResponse memories;
|
||||
@@ -27,6 +30,7 @@ class UserPreferencesResponseDto {
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is UserPreferencesResponseDto &&
|
||||
other.avatar == avatar &&
|
||||
other.download == download &&
|
||||
other.emailNotifications == emailNotifications &&
|
||||
other.memories == memories;
|
||||
|
||||
@@ -34,15 +38,17 @@ class UserPreferencesResponseDto {
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(avatar.hashCode) +
|
||||
(download.hashCode) +
|
||||
(emailNotifications.hashCode) +
|
||||
(memories.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'UserPreferencesResponseDto[avatar=$avatar, emailNotifications=$emailNotifications, memories=$memories]';
|
||||
String toString() => 'UserPreferencesResponseDto[avatar=$avatar, download=$download, emailNotifications=$emailNotifications, memories=$memories]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
json[r'avatar'] = this.avatar;
|
||||
json[r'download'] = this.download;
|
||||
json[r'emailNotifications'] = this.emailNotifications;
|
||||
json[r'memories'] = this.memories;
|
||||
return json;
|
||||
@@ -57,6 +63,7 @@ class UserPreferencesResponseDto {
|
||||
|
||||
return UserPreferencesResponseDto(
|
||||
avatar: AvatarResponse.fromJson(json[r'avatar'])!,
|
||||
download: DownloadResponse.fromJson(json[r'download'])!,
|
||||
emailNotifications: EmailNotificationsResponse.fromJson(json[r'emailNotifications'])!,
|
||||
memories: MemoryResponse.fromJson(json[r'memories'])!,
|
||||
);
|
||||
@@ -107,6 +114,7 @@ class UserPreferencesResponseDto {
|
||||
/// The list of required keys that must be present in a JSON.
|
||||
static const requiredKeys = <String>{
|
||||
'avatar',
|
||||
'download',
|
||||
'emailNotifications',
|
||||
'memories',
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user