BoyLove: make description nullable (#14470)
* BoyLove: make description nullable * bump version
This commit is contained in:
parent
b44700e53c
commit
46d12a0a42
|
@ -6,7 +6,7 @@ ext {
|
||||||
extName = 'BoyLove'
|
extName = 'BoyLove'
|
||||||
pkgNameSuffix = 'zh.boylove'
|
pkgNameSuffix = 'zh.boylove'
|
||||||
extClass = '.BoyLove'
|
extClass = '.BoyLove'
|
||||||
extVersionCode = 5
|
extVersionCode = 6
|
||||||
isNsfw = true
|
isNsfw = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@ class MangaDto(
|
||||||
private val update_time: JsonPrimitive? = null,
|
private val update_time: JsonPrimitive? = null,
|
||||||
private val image: String,
|
private val image: String,
|
||||||
private val auther: String,
|
private val auther: String,
|
||||||
private val desc: String,
|
private val desc: String?,
|
||||||
private val mhstatus: Int,
|
private val mhstatus: Int,
|
||||||
private val keyword: String,
|
private val keyword: String,
|
||||||
) {
|
) {
|
||||||
|
@ -33,14 +33,14 @@ class MangaDto(
|
||||||
thumbnail_url = image.toImageUrl()
|
thumbnail_url = image.toImageUrl()
|
||||||
val rawUpdateTime = update_time
|
val rawUpdateTime = update_time
|
||||||
if (rawUpdateTime == null) {
|
if (rawUpdateTime == null) {
|
||||||
description = desc.trim()
|
description = desc?.trim()
|
||||||
return@apply
|
return@apply
|
||||||
}
|
}
|
||||||
val updateTime = when {
|
val updateTime = when {
|
||||||
rawUpdateTime.isString -> rawUpdateTime.content
|
rawUpdateTime.isString -> rawUpdateTime.content
|
||||||
else -> dateFormat.format(Date(rawUpdateTime.long * 1000))
|
else -> dateFormat.format(Date(rawUpdateTime.long * 1000))
|
||||||
}
|
}
|
||||||
description = "更新时间:$updateTime\n\n${desc.trim()}"
|
description = "更新时间:$updateTime\n\n${desc?.trim()}"
|
||||||
initialized = true
|
initialized = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue