pull/1693/head
kunfei 3 years ago
parent 1f76fd156f
commit 4b8ba884a8
  1. 16
      app/src/main/java/io/legado/app/ui/book/toc/ChapterListAdapter.kt

@ -80,8 +80,8 @@ class ChapterListAdapter(context: Context, val callback: Callback) :
if (!isActive) { if (!isActive) {
return@async return@async
} }
if (displayTitleMap[it.url] == null) { if (displayTitleMap[it.title] == null) {
displayTitleMap[it.url] = it.getDisplayTitle(replaceRules, useReplace) displayTitleMap[it.title] = it.getDisplayTitle(replaceRules, useReplace)
} }
} }
} }
@ -92,13 +92,13 @@ class ChapterListAdapter(context: Context, val callback: Callback) :
} }
private fun getDisplayTile(chapter: BookChapter): String { private fun getDisplayTile(chapter: BookChapter): String {
var displayTile = displayTitleMap[chapter.url] var displayTitle = displayTitleMap[chapter.title]
if (displayTile != null) { if (displayTitle != null) {
return displayTile return displayTitle
} }
displayTile = chapter.getDisplayTitle(replaceRules, useReplace) displayTitle = chapter.getDisplayTitle(replaceRules, useReplace)
displayTitleMap[chapter.url] = displayTile displayTitleMap[chapter.title] = displayTitle
return displayTile return displayTitle
} }
override fun convert( override fun convert(

Loading…
Cancel
Save