From 46d12a0a423908d3b75e68860a7e691edd0e2a56 Mon Sep 17 00:00:00 2001 From: stevenyomi <95685115+stevenyomi@users.noreply.github.com> Date: Fri, 9 Dec 2022 09:37:55 +0800 Subject: [PATCH] BoyLove: make description nullable (#14470) * BoyLove: make description nullable * bump version --- src/zh/boylove/build.gradle | 2 +- .../eu/kanade/tachiyomi/extension/zh/boylove/BoyLoveDto.kt | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/zh/boylove/build.gradle b/src/zh/boylove/build.gradle index 2bbfb877c..62de17fb7 100644 --- a/src/zh/boylove/build.gradle +++ b/src/zh/boylove/build.gradle @@ -6,7 +6,7 @@ ext { extName = 'BoyLove' pkgNameSuffix = 'zh.boylove' extClass = '.BoyLove' - extVersionCode = 5 + extVersionCode = 6 isNsfw = true } diff --git a/src/zh/boylove/src/eu/kanade/tachiyomi/extension/zh/boylove/BoyLoveDto.kt b/src/zh/boylove/src/eu/kanade/tachiyomi/extension/zh/boylove/BoyLoveDto.kt index 82c0deeee..1e3fe9c0e 100644 --- a/src/zh/boylove/src/eu/kanade/tachiyomi/extension/zh/boylove/BoyLoveDto.kt +++ b/src/zh/boylove/src/eu/kanade/tachiyomi/extension/zh/boylove/BoyLoveDto.kt @@ -16,7 +16,7 @@ class MangaDto( private val update_time: JsonPrimitive? = null, private val image: String, private val auther: String, - private val desc: String, + private val desc: String?, private val mhstatus: Int, private val keyword: String, ) { @@ -33,14 +33,14 @@ class MangaDto( thumbnail_url = image.toImageUrl() val rawUpdateTime = update_time if (rawUpdateTime == null) { - description = desc.trim() + description = desc?.trim() return@apply } val updateTime = when { rawUpdateTime.isString -> rawUpdateTime.content else -> dateFormat.format(Date(rawUpdateTime.long * 1000)) } - description = "更新时间:$updateTime\n\n${desc.trim()}" + description = "更新时间:$updateTime\n\n${desc?.trim()}" initialized = true } }