mirror of
https://github.com/gabehf/Fladder.git
synced 2026-03-11 00:10:29 -07:00
feat: Improve how unsupported items are shown. (#129)
Co-authored-by: PartyDonut <PartyDonut@users.noreply.github.com>
This commit is contained in:
parent
85e5d34738
commit
e50d666fa9
12 changed files with 213 additions and 41 deletions
|
|
@ -31,6 +31,7 @@ class ClientSettingsModel with _$ClientSettingsModel {
|
|||
@Default(false) bool pinchPosterZoom,
|
||||
@Default(false) bool mouseDragSupport,
|
||||
@Default(true) bool requireWifi,
|
||||
@Default(false) bool showAllCollectionTypes,
|
||||
@Default(DynamicSchemeVariant.tonalSpot) DynamicSchemeVariant schemeVariant,
|
||||
int? libraryPageSize,
|
||||
}) = _ClientSettingsModel;
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ mixin _$ClientSettingsModel {
|
|||
bool get pinchPosterZoom => throw _privateConstructorUsedError;
|
||||
bool get mouseDragSupport => throw _privateConstructorUsedError;
|
||||
bool get requireWifi => throw _privateConstructorUsedError;
|
||||
bool get showAllCollectionTypes => throw _privateConstructorUsedError;
|
||||
DynamicSchemeVariant get schemeVariant => throw _privateConstructorUsedError;
|
||||
int? get libraryPageSize => throw _privateConstructorUsedError;
|
||||
|
||||
|
|
@ -73,6 +74,7 @@ abstract class $ClientSettingsModelCopyWith<$Res> {
|
|||
bool pinchPosterZoom,
|
||||
bool mouseDragSupport,
|
||||
bool requireWifi,
|
||||
bool showAllCollectionTypes,
|
||||
DynamicSchemeVariant schemeVariant,
|
||||
int? libraryPageSize});
|
||||
}
|
||||
|
|
@ -108,6 +110,7 @@ class _$ClientSettingsModelCopyWithImpl<$Res, $Val extends ClientSettingsModel>
|
|||
Object? pinchPosterZoom = null,
|
||||
Object? mouseDragSupport = null,
|
||||
Object? requireWifi = null,
|
||||
Object? showAllCollectionTypes = null,
|
||||
Object? schemeVariant = null,
|
||||
Object? libraryPageSize = freezed,
|
||||
}) {
|
||||
|
|
@ -176,6 +179,10 @@ class _$ClientSettingsModelCopyWithImpl<$Res, $Val extends ClientSettingsModel>
|
|||
? _value.requireWifi
|
||||
: requireWifi // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
showAllCollectionTypes: null == showAllCollectionTypes
|
||||
? _value.showAllCollectionTypes
|
||||
: showAllCollectionTypes // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
schemeVariant: null == schemeVariant
|
||||
? _value.schemeVariant
|
||||
: schemeVariant // ignore: cast_nullable_to_non_nullable
|
||||
|
|
@ -213,6 +220,7 @@ abstract class _$$ClientSettingsModelImplCopyWith<$Res>
|
|||
bool pinchPosterZoom,
|
||||
bool mouseDragSupport,
|
||||
bool requireWifi,
|
||||
bool showAllCollectionTypes,
|
||||
DynamicSchemeVariant schemeVariant,
|
||||
int? libraryPageSize});
|
||||
}
|
||||
|
|
@ -246,6 +254,7 @@ class __$$ClientSettingsModelImplCopyWithImpl<$Res>
|
|||
Object? pinchPosterZoom = null,
|
||||
Object? mouseDragSupport = null,
|
||||
Object? requireWifi = null,
|
||||
Object? showAllCollectionTypes = null,
|
||||
Object? schemeVariant = null,
|
||||
Object? libraryPageSize = freezed,
|
||||
}) {
|
||||
|
|
@ -314,6 +323,10 @@ class __$$ClientSettingsModelImplCopyWithImpl<$Res>
|
|||
? _value.requireWifi
|
||||
: requireWifi // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
showAllCollectionTypes: null == showAllCollectionTypes
|
||||
? _value.showAllCollectionTypes
|
||||
: showAllCollectionTypes // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
schemeVariant: null == schemeVariant
|
||||
? _value.schemeVariant
|
||||
: schemeVariant // ignore: cast_nullable_to_non_nullable
|
||||
|
|
@ -347,6 +360,7 @@ class _$ClientSettingsModelImpl extends _ClientSettingsModel
|
|||
this.pinchPosterZoom = false,
|
||||
this.mouseDragSupport = false,
|
||||
this.requireWifi = true,
|
||||
this.showAllCollectionTypes = false,
|
||||
this.schemeVariant = DynamicSchemeVariant.tonalSpot,
|
||||
this.libraryPageSize})
|
||||
: super._();
|
||||
|
|
@ -401,13 +415,16 @@ class _$ClientSettingsModelImpl extends _ClientSettingsModel
|
|||
final bool requireWifi;
|
||||
@override
|
||||
@JsonKey()
|
||||
final bool showAllCollectionTypes;
|
||||
@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, requireWifi: $requireWifi, 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, showAllCollectionTypes: $showAllCollectionTypes, schemeVariant: $schemeVariant, libraryPageSize: $libraryPageSize)';
|
||||
}
|
||||
|
||||
@override
|
||||
|
|
@ -431,6 +448,8 @@ class _$ClientSettingsModelImpl extends _ClientSettingsModel
|
|||
..add(DiagnosticsProperty('pinchPosterZoom', pinchPosterZoom))
|
||||
..add(DiagnosticsProperty('mouseDragSupport', mouseDragSupport))
|
||||
..add(DiagnosticsProperty('requireWifi', requireWifi))
|
||||
..add(
|
||||
DiagnosticsProperty('showAllCollectionTypes', showAllCollectionTypes))
|
||||
..add(DiagnosticsProperty('schemeVariant', schemeVariant))
|
||||
..add(DiagnosticsProperty('libraryPageSize', libraryPageSize));
|
||||
}
|
||||
|
|
@ -470,6 +489,8 @@ class _$ClientSettingsModelImpl extends _ClientSettingsModel
|
|||
other.mouseDragSupport == mouseDragSupport) &&
|
||||
(identical(other.requireWifi, requireWifi) ||
|
||||
other.requireWifi == requireWifi) &&
|
||||
(identical(other.showAllCollectionTypes, showAllCollectionTypes) ||
|
||||
other.showAllCollectionTypes == showAllCollectionTypes) &&
|
||||
(identical(other.schemeVariant, schemeVariant) ||
|
||||
other.schemeVariant == schemeVariant) &&
|
||||
(identical(other.libraryPageSize, libraryPageSize) ||
|
||||
|
|
@ -478,26 +499,28 @@ class _$ClientSettingsModelImpl extends _ClientSettingsModel
|
|||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType,
|
||||
syncPath,
|
||||
position,
|
||||
size,
|
||||
timeOut,
|
||||
nextUpDateCutoff,
|
||||
themeMode,
|
||||
themeColor,
|
||||
amoledBlack,
|
||||
blurPlaceHolders,
|
||||
blurUpcomingEpisodes,
|
||||
selectedLocale,
|
||||
enableMediaKeys,
|
||||
posterSize,
|
||||
pinchPosterZoom,
|
||||
mouseDragSupport,
|
||||
requireWifi,
|
||||
schemeVariant,
|
||||
libraryPageSize);
|
||||
int get hashCode => Object.hashAll([
|
||||
runtimeType,
|
||||
syncPath,
|
||||
position,
|
||||
size,
|
||||
timeOut,
|
||||
nextUpDateCutoff,
|
||||
themeMode,
|
||||
themeColor,
|
||||
amoledBlack,
|
||||
blurPlaceHolders,
|
||||
blurUpcomingEpisodes,
|
||||
selectedLocale,
|
||||
enableMediaKeys,
|
||||
posterSize,
|
||||
pinchPosterZoom,
|
||||
mouseDragSupport,
|
||||
requireWifi,
|
||||
showAllCollectionTypes,
|
||||
schemeVariant,
|
||||
libraryPageSize
|
||||
]);
|
||||
|
||||
/// Create a copy of ClientSettingsModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
|
|
@ -534,6 +557,7 @@ abstract class _ClientSettingsModel extends ClientSettingsModel {
|
|||
final bool pinchPosterZoom,
|
||||
final bool mouseDragSupport,
|
||||
final bool requireWifi,
|
||||
final bool showAllCollectionTypes,
|
||||
final DynamicSchemeVariant schemeVariant,
|
||||
final int? libraryPageSize}) = _$ClientSettingsModelImpl;
|
||||
_ClientSettingsModel._() : super._();
|
||||
|
|
@ -575,6 +599,8 @@ abstract class _ClientSettingsModel extends ClientSettingsModel {
|
|||
@override
|
||||
bool get requireWifi;
|
||||
@override
|
||||
bool get showAllCollectionTypes;
|
||||
@override
|
||||
DynamicSchemeVariant get schemeVariant;
|
||||
@override
|
||||
int? get libraryPageSize;
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@ _$ClientSettingsModelImpl _$$ClientSettingsModelImplFromJson(
|
|||
pinchPosterZoom: json['pinchPosterZoom'] as bool? ?? false,
|
||||
mouseDragSupport: json['mouseDragSupport'] as bool? ?? false,
|
||||
requireWifi: json['requireWifi'] as bool? ?? true,
|
||||
showAllCollectionTypes: json['showAllCollectionTypes'] as bool? ?? false,
|
||||
schemeVariant: $enumDecodeNullable(
|
||||
_$DynamicSchemeVariantEnumMap, json['schemeVariant']) ??
|
||||
DynamicSchemeVariant.tonalSpot,
|
||||
|
|
@ -60,6 +61,7 @@ Map<String, dynamic> _$$ClientSettingsModelImplToJson(
|
|||
'pinchPosterZoom': instance.pinchPosterZoom,
|
||||
'mouseDragSupport': instance.mouseDragSupport,
|
||||
'requireWifi': instance.requireWifi,
|
||||
'showAllCollectionTypes': instance.showAllCollectionTypes,
|
||||
'schemeVariant': _$DynamicSchemeVariantEnumMap[instance.schemeVariant]!,
|
||||
'libraryPageSize': instance.libraryPageSize,
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue