mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
feat: make memories slideshow duration configurable (#22783)
This commit is contained in:
parent
4905bba694
commit
9cc88ed2a6
11 changed files with 65 additions and 4 deletions
20
mobile/openapi/lib/model/memories_update.dart
generated
20
mobile/openapi/lib/model/memories_update.dart
generated
|
|
@ -13,9 +13,19 @@ part of openapi.api;
|
|||
class MemoriesUpdate {
|
||||
/// Returns a new [MemoriesUpdate] instance.
|
||||
MemoriesUpdate({
|
||||
this.duration,
|
||||
this.enabled,
|
||||
});
|
||||
|
||||
/// Minimum value: 1
|
||||
///
|
||||
/// 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.
|
||||
///
|
||||
int? duration;
|
||||
|
||||
///
|
||||
/// 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
|
||||
|
|
@ -26,18 +36,25 @@ class MemoriesUpdate {
|
|||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is MemoriesUpdate &&
|
||||
other.duration == duration &&
|
||||
other.enabled == enabled;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(duration == null ? 0 : duration!.hashCode) +
|
||||
(enabled == null ? 0 : enabled!.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'MemoriesUpdate[enabled=$enabled]';
|
||||
String toString() => 'MemoriesUpdate[duration=$duration, enabled=$enabled]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
if (this.duration != null) {
|
||||
json[r'duration'] = this.duration;
|
||||
} else {
|
||||
// json[r'duration'] = null;
|
||||
}
|
||||
if (this.enabled != null) {
|
||||
json[r'enabled'] = this.enabled;
|
||||
} else {
|
||||
|
|
@ -55,6 +72,7 @@ class MemoriesUpdate {
|
|||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return MemoriesUpdate(
|
||||
duration: mapValueOfType<int>(json, r'duration'),
|
||||
enabled: mapValueOfType<bool>(json, r'enabled'),
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue