mirror of
https://github.com/immich-app/immich.git
synced 2025-12-24 01:11:32 +03:00
feat: make memories slideshow duration configurable (#22783)
This commit is contained in:
10
mobile/openapi/lib/model/memories_response.dart
generated
10
mobile/openapi/lib/model/memories_response.dart
generated
@@ -13,25 +13,31 @@ part of openapi.api;
|
||||
class MemoriesResponse {
|
||||
/// Returns a new [MemoriesResponse] instance.
|
||||
MemoriesResponse({
|
||||
this.duration = 5,
|
||||
this.enabled = true,
|
||||
});
|
||||
|
||||
int duration;
|
||||
|
||||
bool enabled;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is MemoriesResponse &&
|
||||
other.duration == duration &&
|
||||
other.enabled == enabled;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(duration.hashCode) +
|
||||
(enabled.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'MemoriesResponse[enabled=$enabled]';
|
||||
String toString() => 'MemoriesResponse[duration=$duration, enabled=$enabled]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
json[r'duration'] = this.duration;
|
||||
json[r'enabled'] = this.enabled;
|
||||
return json;
|
||||
}
|
||||
@@ -45,6 +51,7 @@ class MemoriesResponse {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return MemoriesResponse(
|
||||
duration: mapValueOfType<int>(json, r'duration')!,
|
||||
enabled: mapValueOfType<bool>(json, r'enabled')!,
|
||||
);
|
||||
}
|
||||
@@ -93,6 +100,7 @@ class MemoriesResponse {
|
||||
|
||||
/// The list of required keys that must be present in a JSON.
|
||||
static const requiredKeys = <String>{
|
||||
'duration',
|
||||
'enabled',
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user