feature: Toggle wifi requirement for downloads (#110)

Co-authored-by: PartyDonut <PartyDonut@users.noreply.github.com>
This commit is contained in:
PartyDonut 2024-11-03 10:01:40 +01:00 committed by GitHub
parent 0b0cd3a557
commit cb4b416bfc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 46 additions and 6 deletions

View file

@ -36,6 +36,7 @@ mixin _$ClientSettingsModel {
double get posterSize => throw _privateConstructorUsedError;
bool get pinchPosterZoom => throw _privateConstructorUsedError;
bool get mouseDragSupport => throw _privateConstructorUsedError;
bool get requireWifi => throw _privateConstructorUsedError;
DynamicSchemeVariant get schemeVariant => throw _privateConstructorUsedError;
int? get libraryPageSize => throw _privateConstructorUsedError;
@ -71,6 +72,7 @@ abstract class $ClientSettingsModelCopyWith<$Res> {
double posterSize,
bool pinchPosterZoom,
bool mouseDragSupport,
bool requireWifi,
DynamicSchemeVariant schemeVariant,
int? libraryPageSize});
}
@ -105,6 +107,7 @@ class _$ClientSettingsModelCopyWithImpl<$Res, $Val extends ClientSettingsModel>
Object? posterSize = null,
Object? pinchPosterZoom = null,
Object? mouseDragSupport = null,
Object? requireWifi = null,
Object? schemeVariant = null,
Object? libraryPageSize = freezed,
}) {
@ -169,6 +172,10 @@ class _$ClientSettingsModelCopyWithImpl<$Res, $Val extends ClientSettingsModel>
? _value.mouseDragSupport
: mouseDragSupport // ignore: cast_nullable_to_non_nullable
as bool,
requireWifi: null == requireWifi
? _value.requireWifi
: requireWifi // ignore: cast_nullable_to_non_nullable
as bool,
schemeVariant: null == schemeVariant
? _value.schemeVariant
: schemeVariant // ignore: cast_nullable_to_non_nullable
@ -205,6 +212,7 @@ abstract class _$$ClientSettingsModelImplCopyWith<$Res>
double posterSize,
bool pinchPosterZoom,
bool mouseDragSupport,
bool requireWifi,
DynamicSchemeVariant schemeVariant,
int? libraryPageSize});
}
@ -237,6 +245,7 @@ class __$$ClientSettingsModelImplCopyWithImpl<$Res>
Object? posterSize = null,
Object? pinchPosterZoom = null,
Object? mouseDragSupport = null,
Object? requireWifi = null,
Object? schemeVariant = null,
Object? libraryPageSize = freezed,
}) {
@ -301,6 +310,10 @@ class __$$ClientSettingsModelImplCopyWithImpl<$Res>
? _value.mouseDragSupport
: mouseDragSupport // ignore: cast_nullable_to_non_nullable
as bool,
requireWifi: null == requireWifi
? _value.requireWifi
: requireWifi // ignore: cast_nullable_to_non_nullable
as bool,
schemeVariant: null == schemeVariant
? _value.schemeVariant
: schemeVariant // ignore: cast_nullable_to_non_nullable
@ -326,13 +339,14 @@ class _$ClientSettingsModelImpl extends _ClientSettingsModel
this.themeMode = ThemeMode.system,
this.themeColor,
this.amoledBlack = false,
this.blurPlaceHolders = false,
this.blurPlaceHolders = true,
this.blurUpcomingEpisodes = false,
@LocaleConvert() this.selectedLocale,
this.enableMediaKeys = true,
this.posterSize = 1.0,
this.pinchPosterZoom = false,
this.mouseDragSupport = false,
this.requireWifi = true,
this.schemeVariant = DynamicSchemeVariant.tonalSpot,
this.libraryPageSize})
: super._();
@ -384,13 +398,16 @@ class _$ClientSettingsModelImpl extends _ClientSettingsModel
final bool mouseDragSupport;
@override
@JsonKey()
final bool requireWifi;
@override
@JsonKey()
final DynamicSchemeVariant schemeVariant;
@override
final int? libraryPageSize;
@override
String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) {
return 'ClientSettingsModel(syncPath: $syncPath, position: $position, size: $size, timeOut: $timeOut, nextUpDateCutoff: $nextUpDateCutoff, themeMode: $themeMode, themeColor: $themeColor, amoledBlack: $amoledBlack, blurPlaceHolders: $blurPlaceHolders, blurUpcomingEpisodes: $blurUpcomingEpisodes, selectedLocale: $selectedLocale, enableMediaKeys: $enableMediaKeys, posterSize: $posterSize, pinchPosterZoom: $pinchPosterZoom, mouseDragSupport: $mouseDragSupport, schemeVariant: $schemeVariant, libraryPageSize: $libraryPageSize)';
return 'ClientSettingsModel(syncPath: $syncPath, position: $position, size: $size, timeOut: $timeOut, nextUpDateCutoff: $nextUpDateCutoff, themeMode: $themeMode, themeColor: $themeColor, amoledBlack: $amoledBlack, blurPlaceHolders: $blurPlaceHolders, blurUpcomingEpisodes: $blurUpcomingEpisodes, selectedLocale: $selectedLocale, enableMediaKeys: $enableMediaKeys, posterSize: $posterSize, pinchPosterZoom: $pinchPosterZoom, mouseDragSupport: $mouseDragSupport, requireWifi: $requireWifi, schemeVariant: $schemeVariant, libraryPageSize: $libraryPageSize)';
}
@override
@ -413,6 +430,7 @@ class _$ClientSettingsModelImpl extends _ClientSettingsModel
..add(DiagnosticsProperty('posterSize', posterSize))
..add(DiagnosticsProperty('pinchPosterZoom', pinchPosterZoom))
..add(DiagnosticsProperty('mouseDragSupport', mouseDragSupport))
..add(DiagnosticsProperty('requireWifi', requireWifi))
..add(DiagnosticsProperty('schemeVariant', schemeVariant))
..add(DiagnosticsProperty('libraryPageSize', libraryPageSize));
}
@ -450,6 +468,8 @@ class _$ClientSettingsModelImpl extends _ClientSettingsModel
other.pinchPosterZoom == pinchPosterZoom) &&
(identical(other.mouseDragSupport, mouseDragSupport) ||
other.mouseDragSupport == mouseDragSupport) &&
(identical(other.requireWifi, requireWifi) ||
other.requireWifi == requireWifi) &&
(identical(other.schemeVariant, schemeVariant) ||
other.schemeVariant == schemeVariant) &&
(identical(other.libraryPageSize, libraryPageSize) ||
@ -475,6 +495,7 @@ class _$ClientSettingsModelImpl extends _ClientSettingsModel
posterSize,
pinchPosterZoom,
mouseDragSupport,
requireWifi,
schemeVariant,
libraryPageSize);
@ -512,6 +533,7 @@ abstract class _ClientSettingsModel extends ClientSettingsModel {
final double posterSize,
final bool pinchPosterZoom,
final bool mouseDragSupport,
final bool requireWifi,
final DynamicSchemeVariant schemeVariant,
final int? libraryPageSize}) = _$ClientSettingsModelImpl;
_ClientSettingsModel._() : super._();
@ -551,6 +573,8 @@ abstract class _ClientSettingsModel extends ClientSettingsModel {
@override
bool get mouseDragSupport;
@override
bool get requireWifi;
@override
DynamicSchemeVariant get schemeVariant;
@override
int? get libraryPageSize;