mirror of
https://github.com/gabehf/Fladder.git
synced 2026-03-09 15:38:13 -07:00
feature: Added update notification and download links per platform (#362)
Co-authored-by: PartyDonut <PartyDonut@users.noreply.github.com>
This commit is contained in:
parent
5ef7936c33
commit
2c71dde228
16 changed files with 712 additions and 8 deletions
|
|
@ -34,6 +34,8 @@ class ClientSettingsModel with _$ClientSettingsModel {
|
|||
@Default(false) bool showAllCollectionTypes,
|
||||
@Default(2) int maxConcurrentDownloads,
|
||||
@Default(DynamicSchemeVariant.rainbow) DynamicSchemeVariant schemeVariant,
|
||||
@Default(true) bool checkForUpdates,
|
||||
String? lastViewedUpdate,
|
||||
int? libraryPageSize,
|
||||
}) = _ClientSettingsModel;
|
||||
|
||||
|
|
|
|||
|
|
@ -40,6 +40,8 @@ mixin _$ClientSettingsModel {
|
|||
bool get showAllCollectionTypes => throw _privateConstructorUsedError;
|
||||
int get maxConcurrentDownloads => throw _privateConstructorUsedError;
|
||||
DynamicSchemeVariant get schemeVariant => throw _privateConstructorUsedError;
|
||||
bool get checkForUpdates => throw _privateConstructorUsedError;
|
||||
String? get lastViewedUpdate => throw _privateConstructorUsedError;
|
||||
int? get libraryPageSize => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this ClientSettingsModel to a JSON map.
|
||||
|
|
@ -78,6 +80,8 @@ abstract class $ClientSettingsModelCopyWith<$Res> {
|
|||
bool showAllCollectionTypes,
|
||||
int maxConcurrentDownloads,
|
||||
DynamicSchemeVariant schemeVariant,
|
||||
bool checkForUpdates,
|
||||
String? lastViewedUpdate,
|
||||
int? libraryPageSize});
|
||||
}
|
||||
|
||||
|
|
@ -115,6 +119,8 @@ class _$ClientSettingsModelCopyWithImpl<$Res, $Val extends ClientSettingsModel>
|
|||
Object? showAllCollectionTypes = null,
|
||||
Object? maxConcurrentDownloads = null,
|
||||
Object? schemeVariant = null,
|
||||
Object? checkForUpdates = null,
|
||||
Object? lastViewedUpdate = freezed,
|
||||
Object? libraryPageSize = freezed,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
|
|
@ -194,6 +200,14 @@ class _$ClientSettingsModelCopyWithImpl<$Res, $Val extends ClientSettingsModel>
|
|||
? _value.schemeVariant
|
||||
: schemeVariant // ignore: cast_nullable_to_non_nullable
|
||||
as DynamicSchemeVariant,
|
||||
checkForUpdates: null == checkForUpdates
|
||||
? _value.checkForUpdates
|
||||
: checkForUpdates // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
lastViewedUpdate: freezed == lastViewedUpdate
|
||||
? _value.lastViewedUpdate
|
||||
: lastViewedUpdate // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
libraryPageSize: freezed == libraryPageSize
|
||||
? _value.libraryPageSize
|
||||
: libraryPageSize // ignore: cast_nullable_to_non_nullable
|
||||
|
|
@ -230,6 +244,8 @@ abstract class _$$ClientSettingsModelImplCopyWith<$Res>
|
|||
bool showAllCollectionTypes,
|
||||
int maxConcurrentDownloads,
|
||||
DynamicSchemeVariant schemeVariant,
|
||||
bool checkForUpdates,
|
||||
String? lastViewedUpdate,
|
||||
int? libraryPageSize});
|
||||
}
|
||||
|
||||
|
|
@ -265,6 +281,8 @@ class __$$ClientSettingsModelImplCopyWithImpl<$Res>
|
|||
Object? showAllCollectionTypes = null,
|
||||
Object? maxConcurrentDownloads = null,
|
||||
Object? schemeVariant = null,
|
||||
Object? checkForUpdates = null,
|
||||
Object? lastViewedUpdate = freezed,
|
||||
Object? libraryPageSize = freezed,
|
||||
}) {
|
||||
return _then(_$ClientSettingsModelImpl(
|
||||
|
|
@ -344,6 +362,14 @@ class __$$ClientSettingsModelImplCopyWithImpl<$Res>
|
|||
? _value.schemeVariant
|
||||
: schemeVariant // ignore: cast_nullable_to_non_nullable
|
||||
as DynamicSchemeVariant,
|
||||
checkForUpdates: null == checkForUpdates
|
||||
? _value.checkForUpdates
|
||||
: checkForUpdates // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
lastViewedUpdate: freezed == lastViewedUpdate
|
||||
? _value.lastViewedUpdate
|
||||
: lastViewedUpdate // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
libraryPageSize: freezed == libraryPageSize
|
||||
? _value.libraryPageSize
|
||||
: libraryPageSize // ignore: cast_nullable_to_non_nullable
|
||||
|
|
@ -376,6 +402,8 @@ class _$ClientSettingsModelImpl extends _ClientSettingsModel
|
|||
this.showAllCollectionTypes = false,
|
||||
this.maxConcurrentDownloads = 2,
|
||||
this.schemeVariant = DynamicSchemeVariant.rainbow,
|
||||
this.checkForUpdates = true,
|
||||
this.lastViewedUpdate,
|
||||
this.libraryPageSize})
|
||||
: super._();
|
||||
|
||||
|
|
@ -437,11 +465,16 @@ class _$ClientSettingsModelImpl extends _ClientSettingsModel
|
|||
@JsonKey()
|
||||
final DynamicSchemeVariant schemeVariant;
|
||||
@override
|
||||
@JsonKey()
|
||||
final bool checkForUpdates;
|
||||
@override
|
||||
final String? lastViewedUpdate;
|
||||
@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, showAllCollectionTypes: $showAllCollectionTypes, maxConcurrentDownloads: $maxConcurrentDownloads, 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, maxConcurrentDownloads: $maxConcurrentDownloads, schemeVariant: $schemeVariant, checkForUpdates: $checkForUpdates, lastViewedUpdate: $lastViewedUpdate, libraryPageSize: $libraryPageSize)';
|
||||
}
|
||||
|
||||
@override
|
||||
|
|
@ -470,6 +503,8 @@ class _$ClientSettingsModelImpl extends _ClientSettingsModel
|
|||
..add(
|
||||
DiagnosticsProperty('maxConcurrentDownloads', maxConcurrentDownloads))
|
||||
..add(DiagnosticsProperty('schemeVariant', schemeVariant))
|
||||
..add(DiagnosticsProperty('checkForUpdates', checkForUpdates))
|
||||
..add(DiagnosticsProperty('lastViewedUpdate', lastViewedUpdate))
|
||||
..add(DiagnosticsProperty('libraryPageSize', libraryPageSize));
|
||||
}
|
||||
|
||||
|
|
@ -514,6 +549,10 @@ class _$ClientSettingsModelImpl extends _ClientSettingsModel
|
|||
other.maxConcurrentDownloads == maxConcurrentDownloads) &&
|
||||
(identical(other.schemeVariant, schemeVariant) ||
|
||||
other.schemeVariant == schemeVariant) &&
|
||||
(identical(other.checkForUpdates, checkForUpdates) ||
|
||||
other.checkForUpdates == checkForUpdates) &&
|
||||
(identical(other.lastViewedUpdate, lastViewedUpdate) ||
|
||||
other.lastViewedUpdate == lastViewedUpdate) &&
|
||||
(identical(other.libraryPageSize, libraryPageSize) ||
|
||||
other.libraryPageSize == libraryPageSize));
|
||||
}
|
||||
|
|
@ -541,6 +580,8 @@ class _$ClientSettingsModelImpl extends _ClientSettingsModel
|
|||
showAllCollectionTypes,
|
||||
maxConcurrentDownloads,
|
||||
schemeVariant,
|
||||
checkForUpdates,
|
||||
lastViewedUpdate,
|
||||
libraryPageSize
|
||||
]);
|
||||
|
||||
|
|
@ -582,6 +623,8 @@ abstract class _ClientSettingsModel extends ClientSettingsModel {
|
|||
final bool showAllCollectionTypes,
|
||||
final int maxConcurrentDownloads,
|
||||
final DynamicSchemeVariant schemeVariant,
|
||||
final bool checkForUpdates,
|
||||
final String? lastViewedUpdate,
|
||||
final int? libraryPageSize}) = _$ClientSettingsModelImpl;
|
||||
_ClientSettingsModel._() : super._();
|
||||
|
||||
|
|
@ -628,6 +671,10 @@ abstract class _ClientSettingsModel extends ClientSettingsModel {
|
|||
@override
|
||||
DynamicSchemeVariant get schemeVariant;
|
||||
@override
|
||||
bool get checkForUpdates;
|
||||
@override
|
||||
String? get lastViewedUpdate;
|
||||
@override
|
||||
int? get libraryPageSize;
|
||||
|
||||
/// Create a copy of ClientSettingsModel
|
||||
|
|
|
|||
|
|
@ -41,6 +41,8 @@ _$ClientSettingsModelImpl _$$ClientSettingsModelImplFromJson(
|
|||
schemeVariant: $enumDecodeNullable(
|
||||
_$DynamicSchemeVariantEnumMap, json['schemeVariant']) ??
|
||||
DynamicSchemeVariant.rainbow,
|
||||
checkForUpdates: json['checkForUpdates'] as bool? ?? true,
|
||||
lastViewedUpdate: json['lastViewedUpdate'] as String?,
|
||||
libraryPageSize: (json['libraryPageSize'] as num?)?.toInt(),
|
||||
);
|
||||
|
||||
|
|
@ -66,6 +68,8 @@ Map<String, dynamic> _$$ClientSettingsModelImplToJson(
|
|||
'showAllCollectionTypes': instance.showAllCollectionTypes,
|
||||
'maxConcurrentDownloads': instance.maxConcurrentDownloads,
|
||||
'schemeVariant': _$DynamicSchemeVariantEnumMap[instance.schemeVariant]!,
|
||||
'checkForUpdates': instance.checkForUpdates,
|
||||
'lastViewedUpdate': instance.lastViewedUpdate,
|
||||
'libraryPageSize': instance.libraryPageSize,
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue