pull/1581/head
kunfei 3 years ago
parent ed3038b6d1
commit e2f1c497a8
  1. 3
      app/src/main/java/io/legado/app/ui/book/toc/ChapterListAdapter.kt

@ -23,6 +23,7 @@ class ChapterListAdapter(context: Context, val callback: Callback) :
get() = callback.book?.let { get() = callback.book?.let {
ContentProcessor.get(it.name, it.origin).getReplaceRules() ContentProcessor.get(it.name, it.origin).getReplaceRules()
} }
val useReplace get() = callback.book?.getUseReplaceRule() == true
val cacheFileNames = hashSetOf<String>() val cacheFileNames = hashSetOf<String>()
val diffCallBack = object : DiffUtil.ItemCallback<BookChapter>() { val diffCallBack = object : DiffUtil.ItemCallback<BookChapter>() {
@ -61,7 +62,7 @@ class ChapterListAdapter(context: Context, val callback: Callback) :
} else { } else {
tvChapterName.setTextColor(context.getCompatColor(R.color.primaryText)) tvChapterName.setTextColor(context.getCompatColor(R.color.primaryText))
} }
tvChapterName.text = item.getDisplayTitle(replaceRules) tvChapterName.text = item.getDisplayTitle(replaceRules, useReplace)
if (item.isVolume) { if (item.isVolume) {
//卷名,如第一卷 突出显示 //卷名,如第一卷 突出显示
tvChapterItem.setBackgroundColor(context.getCompatColor(R.color.btn_bg_press)) tvChapterItem.setBackgroundColor(context.getCompatColor(R.color.btn_bg_press))

Loading…
Cancel
Save