HeanCMS: Add chapter title support (#4447)

This commit is contained in:
Wackery 2024-08-06 20:35:48 -07:00 committed by Draff
parent cdb8de9fbf
commit 6f98841b14
No known key found for this signature in database
GPG Key ID: E8A89F3211677653
2 changed files with 6 additions and 1 deletions

View File

@ -2,7 +2,7 @@ plugins {
id("lib-multisrc")
}
baseVersionCode = 26
baseVersionCode = 27
dependencies {
api(project(":lib:i18n"))

View File

@ -103,6 +103,7 @@ class HeanCmsChapterPayloadDto(
class HeanCmsChapterDto(
private val id: Int,
@SerialName("chapter_name") private val name: String,
@SerialName("chapter_title") private val title: String? = null,
@SerialName("chapter_slug") private val slug: String,
@SerialName("created_at") private val createdAt: String,
val price: Int? = null,
@ -114,6 +115,10 @@ class HeanCmsChapterDto(
): SChapter = SChapter.create().apply {
name = this@HeanCmsChapterDto.name.trim()
if (title != null) {
name += " - ${title.trim()}"
}
if (price != 0) {
name += " \uD83D\uDD12"
}