mirror of
https://github.com/kodjodevf/mangayomi.git
synced 2026-04-21 16:01:58 +00:00
small fix
This commit is contained in:
parent
478c0ba45c
commit
80a8feee33
4 changed files with 6 additions and 6 deletions
|
|
@ -19,7 +19,7 @@ class Category {
|
||||||
Category.fromJson(Map<String, dynamic> json) {
|
Category.fromJson(Map<String, dynamic> json) {
|
||||||
id = json['id'];
|
id = json['id'];
|
||||||
name = json['name'];
|
name = json['name'];
|
||||||
forItemType = json['forItemType'];
|
forItemType = ItemType.values[json['forItemType'] ?? 0];
|
||||||
}
|
}
|
||||||
|
|
||||||
Category.fromJsonV1(Map<String, dynamic> json) {
|
Category.fromJsonV1(Map<String, dynamic> json) {
|
||||||
|
|
@ -33,5 +33,5 @@ class Category {
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, dynamic> toJson() =>
|
Map<String, dynamic> toJson() =>
|
||||||
{'id': id, 'name': name, 'forItemType': forItemType};
|
{'id': id, 'name': name, 'forItemType': forItemType.index};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ class History {
|
||||||
chapterId = json['chapterId'];
|
chapterId = json['chapterId'];
|
||||||
date = json['date'];
|
date = json['date'];
|
||||||
id = json['id'];
|
id = json['id'];
|
||||||
itemType = json['itemType'];
|
itemType = ItemType.values[json['itemType'] ?? 0];
|
||||||
mangaId = json['mangaId'];
|
mangaId = json['mangaId'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -54,7 +54,7 @@ class History {
|
||||||
'chapterId': chapterId,
|
'chapterId': chapterId,
|
||||||
'date': date,
|
'date': date,
|
||||||
'id': id,
|
'id': id,
|
||||||
'itemType': itemType,
|
'itemType': itemType.index,
|
||||||
'mangaId': mangaId
|
'mangaId': mangaId
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -87,7 +87,7 @@ class Manga {
|
||||||
id = json['id'];
|
id = json['id'];
|
||||||
imageUrl = json['imageUrl'];
|
imageUrl = json['imageUrl'];
|
||||||
isLocalArchive = json['isLocalArchive'];
|
isLocalArchive = json['isLocalArchive'];
|
||||||
itemType = ItemType.values[json['itemType']];
|
itemType = ItemType.values[json['itemType'] ?? 0];
|
||||||
lang = json['lang'];
|
lang = json['lang'];
|
||||||
lastRead = json['lastRead'];
|
lastRead = json['lastRead'];
|
||||||
lastUpdate = json['lastUpdate'];
|
lastUpdate = json['lastUpdate'];
|
||||||
|
|
|
||||||
|
|
@ -171,7 +171,7 @@ class Source {
|
||||||
'isAdded': isAdded,
|
'isAdded': isAdded,
|
||||||
'isFullData': isFullData,
|
'isFullData': isFullData,
|
||||||
'isManga': isManga,
|
'isManga': isManga,
|
||||||
'itemType': itemType,
|
'itemType': itemType.index,
|
||||||
'isNsfw': isNsfw,
|
'isNsfw': isNsfw,
|
||||||
'isPinned': isPinned,
|
'isPinned': isPinned,
|
||||||
'lang': lang,
|
'lang': lang,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue