Browse Source

Fix chapter number display style (#7383)

Ivan Iskandar 2 years ago
parent
commit
c33e5c8a17
1 changed files with 7 additions and 6 deletions
  1. 7 6
      app/src/main/java/eu/kanade/presentation/manga/MangaScreen.kt

+ 7 - 6
app/src/main/java/eu/kanade/presentation/manga/MangaScreen.kt

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