mirror of
https://github.com/keiyoushi/extensions-source.git
synced 2024-11-22 02:12:42 +01:00
HeanCMS: Add chapter title support (#4447)
This commit is contained in:
parent
e32bf4177c
commit
66615df76d
@ -2,7 +2,7 @@ plugins {
|
|||||||
id("lib-multisrc")
|
id("lib-multisrc")
|
||||||
}
|
}
|
||||||
|
|
||||||
baseVersionCode = 26
|
baseVersionCode = 27
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
api(project(":lib:i18n"))
|
api(project(":lib:i18n"))
|
||||||
|
@ -103,6 +103,7 @@ class HeanCmsChapterPayloadDto(
|
|||||||
class HeanCmsChapterDto(
|
class HeanCmsChapterDto(
|
||||||
private val id: Int,
|
private val id: Int,
|
||||||
@SerialName("chapter_name") private val name: String,
|
@SerialName("chapter_name") private val name: String,
|
||||||
|
@SerialName("chapter_title") private val title: String? = null,
|
||||||
@SerialName("chapter_slug") private val slug: String,
|
@SerialName("chapter_slug") private val slug: String,
|
||||||
@SerialName("created_at") private val createdAt: String,
|
@SerialName("created_at") private val createdAt: String,
|
||||||
val price: Int? = null,
|
val price: Int? = null,
|
||||||
@ -114,6 +115,10 @@ class HeanCmsChapterDto(
|
|||||||
): SChapter = SChapter.create().apply {
|
): SChapter = SChapter.create().apply {
|
||||||
name = this@HeanCmsChapterDto.name.trim()
|
name = this@HeanCmsChapterDto.name.trim()
|
||||||
|
|
||||||
|
if (title != null) {
|
||||||
|
name += " - ${title.trim()}"
|
||||||
|
}
|
||||||
|
|
||||||
if (price != 0) {
|
if (price != 0) {
|
||||||
name += " \uD83D\uDD12"
|
name += " \uD83D\uDD12"
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user