mirror of
https://github.com/kodjodevf/mangayomi.git
synced 2026-04-21 03:32:06 +00:00
fix #388
This commit is contained in:
parent
a5af985c2c
commit
f841c1adde
5 changed files with 20 additions and 16 deletions
|
|
@ -10,11 +10,11 @@ class Category {
|
|||
bool? forManga;
|
||||
@enumerated
|
||||
late ItemType forItemType;
|
||||
Category(
|
||||
{this.id = Isar.autoIncrement,
|
||||
required this.name,
|
||||
this.forManga = true,
|
||||
required this.forItemType});
|
||||
Category({
|
||||
this.id = Isar.autoIncrement,
|
||||
required this.name,
|
||||
required this.forItemType,
|
||||
});
|
||||
|
||||
Category.fromJson(Map<String, dynamic> json) {
|
||||
id = json['id'];
|
||||
|
|
@ -25,13 +25,17 @@ class Category {
|
|||
Category.fromJsonV1(Map<String, dynamic> json) {
|
||||
id = json['id'];
|
||||
name = json['name'];
|
||||
forItemType = json['forManga'] is bool
|
||||
? json['forManga'] == true
|
||||
? ItemType.manga
|
||||
: ItemType.anime
|
||||
: ItemType.manga;
|
||||
forItemType =
|
||||
json['forManga'] is bool
|
||||
? json['forManga'] == true
|
||||
? ItemType.manga
|
||||
: ItemType.anime
|
||||
: ItemType.manga;
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() =>
|
||||
{'id': id, 'name': name, 'forItemType': forItemType.index};
|
||||
Map<String, dynamic> toJson() => {
|
||||
'id': id,
|
||||
'name': name,
|
||||
'forItemType': forItemType.index,
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -84,10 +84,10 @@ Category _categoryDeserialize(
|
|||
forItemType:
|
||||
_CategoryforItemTypeValueEnumMap[reader.readByteOrNull(offsets[0])] ??
|
||||
ItemType.manga,
|
||||
forManga: reader.readBoolOrNull(offsets[1]),
|
||||
id: id,
|
||||
name: reader.readStringOrNull(offsets[2]),
|
||||
);
|
||||
object.forManga = reader.readBoolOrNull(offsets[1]);
|
||||
return object;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ part of 'router.dart';
|
|||
// RiverpodGenerator
|
||||
// **************************************************************************
|
||||
|
||||
String _$routerHash() => r'7a4e8651b0f12561ff4be5ca85a0142ab64a3da3';
|
||||
String _$routerHash() => r'52271f834e5242820afdb209d765c3cee8f3fe5b';
|
||||
|
||||
/// See also [router].
|
||||
@ProviderFor(router)
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ part of 'aniskip.dart';
|
|||
// RiverpodGenerator
|
||||
// **************************************************************************
|
||||
|
||||
String _$aniSkipHash() => r'2e5d19b025a2207ff64da7bf7908450ea9e5ff8c';
|
||||
String _$aniSkipHash() => r'887869b54e2e151633efd46da83bde845e14f421';
|
||||
|
||||
/// See also [AniSkip].
|
||||
@ProviderFor(AniSkip)
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ part of 'anilist.dart';
|
|||
// RiverpodGenerator
|
||||
// **************************************************************************
|
||||
|
||||
String _$anilistHash() => r'ddd07acc8d28d2aa95c942566109e9393ca9e5ed';
|
||||
String _$anilistHash() => r'70e8cd537270a9054a1ef72de117fc7ad5545218';
|
||||
|
||||
/// Copied from Dart SDK
|
||||
class _SystemHash {
|
||||
|
|
|
|||
Loading…
Reference in a new issue