Fix chapter number display style (#7383)

This commit is contained in:
Ivan Iskandar 2022-06-26 23:58:14 +07:00 committed by GitHub
parent 6129bbc9ab
commit c33e5c8a17
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -390,12 +390,13 @@ private fun MangaScreenSmallImpl(
) { ) {
items(items = chapters) { chapterItem -> items(items = chapters) { chapterItem ->
val (chapter, downloadState, downloadProgress) = chapterItem val (chapter, downloadState, downloadProgress) = chapterItem
val chapterTitle = remember(state.manga.displayMode, chapter.chapterNumber, chapter.name) { val chapterTitle = if (state.manga.displayMode == CHAPTER_DISPLAY_NUMBER) {
if (state.manga.displayMode == CHAPTER_DISPLAY_NUMBER) { stringResource(
chapterDecimalFormat.format(chapter.chapterNumber.toDouble()) id = R.string.display_mode_chapter,
} else { chapterDecimalFormat.format(chapter.chapterNumber.toDouble()),
chapter.name )
} } else {
chapter.name
} }
val date = remember(chapter.dateUpload) { val date = remember(chapter.dateUpload) {
chapter.dateUpload chapter.dateUpload