From 775ab471f5c003929a53b3035ba0e97e09bf9856 Mon Sep 17 00:00:00 2001 From: nyne Date: Tue, 12 Nov 2024 17:49:02 +0800 Subject: [PATCH] fix subtitle --- assets/init.js | 4 +++- lib/foundation/comic_source/models.dart | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/assets/init.js b/assets/init.js index 6d08177..03ee00a 100644 --- a/assets/init.js +++ b/assets/init.js @@ -850,6 +850,7 @@ let console = { * @param id {string} * @param title {string} * @param subtitle {string} + * @param subTitle {string} - equal to subtitle * @param cover {string} * @param tags {string[]} * @param description {string} @@ -859,10 +860,11 @@ let console = { * @param stars {number?} - 0-5, double * @constructor */ -function Comic({id, title, subtitle, cover, tags, description, maxPage, language, favoriteId, stars}) { +function Comic({id, title, subtitle, subTitle, cover, tags, description, maxPage, language, favoriteId, stars}) { this.id = id; this.title = title; this.subtitle = subtitle; + this.subTitle = subTitle; this.cover = cover; this.tags = tags; this.description = description; diff --git a/lib/foundation/comic_source/models.dart b/lib/foundation/comic_source/models.dart index 65384b3..042682b 100644 --- a/lib/foundation/comic_source/models.dart +++ b/lib/foundation/comic_source/models.dart @@ -92,7 +92,7 @@ class Comic { Comic.fromJson(Map json, this.sourceKey) : title = json["title"], - subtitle = json["subtitle"] ?? "", + subtitle = json["subtitle"] ?? json["subTitle"] ?? "", cover = json["cover"], id = json["id"], tags = List.from(json["tags"] ?? []),