mirror of
https://github.com/immich-app/immich.git
synced 2026-07-05 04:07:39 -07:00
0a4ed6fd71
* refactor: app metadata * refactor to per row store * cleanup * more test * review changes * more refactor * refactor * migrate primary color * migrate dynamic theme * migrate colorfulInterface * cleanup providers * migrate cleanup * migrate mapconfig * remove unused keys * migrate timeline config * migrate image config * migrate viewer config --------- Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
38 lines
1.2 KiB
Dart
38 lines
1.2 KiB
Dart
class ViewerConfig {
|
|
final bool loopVideo;
|
|
final bool loadOriginalVideo;
|
|
final bool autoPlayVideo;
|
|
final bool tapToNavigate;
|
|
|
|
const ViewerConfig({
|
|
this.loopVideo = true,
|
|
this.loadOriginalVideo = false,
|
|
this.autoPlayVideo = true,
|
|
this.tapToNavigate = false,
|
|
});
|
|
|
|
ViewerConfig copyWith({bool? loopVideo, bool? loadOriginalVideo, bool? autoPlayVideo, bool? tapToNavigate}) =>
|
|
ViewerConfig(
|
|
loopVideo: loopVideo ?? this.loopVideo,
|
|
loadOriginalVideo: loadOriginalVideo ?? this.loadOriginalVideo,
|
|
autoPlayVideo: autoPlayVideo ?? this.autoPlayVideo,
|
|
tapToNavigate: tapToNavigate ?? this.tapToNavigate,
|
|
);
|
|
|
|
@override
|
|
bool operator ==(Object other) =>
|
|
identical(this, other) ||
|
|
(other is ViewerConfig &&
|
|
other.loopVideo == loopVideo &&
|
|
other.loadOriginalVideo == loadOriginalVideo &&
|
|
other.autoPlayVideo == autoPlayVideo &&
|
|
other.tapToNavigate == tapToNavigate);
|
|
|
|
@override
|
|
int get hashCode => Object.hash(loopVideo, loadOriginalVideo, autoPlayVideo, tapToNavigate);
|
|
|
|
@override
|
|
String toString() =>
|
|
'ViewerConfig(loopVideo: $loopVideo, loadOriginalVideo: $loadOriginalVideo, autoPlayVideo: $autoPlayVideo, tapToNavigate: $tapToNavigate)';
|
|
}
|