mirror of
https://github.com/immich-app/immich.git
synced 2025-12-17 01:11:13 +03:00
feat(web): email notification preference settings (#9934)
* feat(web): email notification preference settings * Update * remove failed api generation file * fix handle album invite return value * Update web/src/lib/components/user-settings-page/notifications-settings.svelte Co-authored-by: Daniel Dietzler <36593685+danieldietzler@users.noreply.github.com> * wording * test --------- Co-authored-by: Daniel Dietzler <mail@ddietzler.dev> Co-authored-by: Daniel Dietzler <36593685+danieldietzler@users.noreply.github.com>
This commit is contained in:
@@ -14,6 +14,7 @@ class UserPreferencesUpdateDto {
|
||||
/// Returns a new [UserPreferencesUpdateDto] instance.
|
||||
UserPreferencesUpdateDto({
|
||||
this.avatar,
|
||||
this.emailNotifications,
|
||||
this.memories,
|
||||
});
|
||||
|
||||
@@ -25,6 +26,14 @@ class UserPreferencesUpdateDto {
|
||||
///
|
||||
AvatarUpdate? avatar;
|
||||
|
||||
///
|
||||
/// 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.
|
||||
///
|
||||
EmailNotificationsUpdate? emailNotifications;
|
||||
|
||||
///
|
||||
/// 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
|
||||
@@ -36,16 +45,18 @@ class UserPreferencesUpdateDto {
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is UserPreferencesUpdateDto &&
|
||||
other.avatar == avatar &&
|
||||
other.emailNotifications == emailNotifications &&
|
||||
other.memories == memories;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(avatar == null ? 0 : avatar!.hashCode) +
|
||||
(emailNotifications == null ? 0 : emailNotifications!.hashCode) +
|
||||
(memories == null ? 0 : memories!.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'UserPreferencesUpdateDto[avatar=$avatar, memories=$memories]';
|
||||
String toString() => 'UserPreferencesUpdateDto[avatar=$avatar, emailNotifications=$emailNotifications, memories=$memories]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
@@ -54,6 +65,11 @@ class UserPreferencesUpdateDto {
|
||||
} else {
|
||||
// json[r'avatar'] = null;
|
||||
}
|
||||
if (this.emailNotifications != null) {
|
||||
json[r'emailNotifications'] = this.emailNotifications;
|
||||
} else {
|
||||
// json[r'emailNotifications'] = null;
|
||||
}
|
||||
if (this.memories != null) {
|
||||
json[r'memories'] = this.memories;
|
||||
} else {
|
||||
@@ -71,6 +87,7 @@ class UserPreferencesUpdateDto {
|
||||
|
||||
return UserPreferencesUpdateDto(
|
||||
avatar: AvatarUpdate.fromJson(json[r'avatar']),
|
||||
emailNotifications: EmailNotificationsUpdate.fromJson(json[r'emailNotifications']),
|
||||
memories: MemoryUpdate.fromJson(json[r'memories']),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user