From e2f1c497a8348fab3ab2c34207276f42c5598b02 Mon Sep 17 00:00:00 2001 From: kunfei Date: Thu, 3 Feb 2022 19:53:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/io/legado/app/ui/book/toc/ChapterListAdapter.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/io/legado/app/ui/book/toc/ChapterListAdapter.kt b/app/src/main/java/io/legado/app/ui/book/toc/ChapterListAdapter.kt index 45e24303b..5dd420649 100644 --- a/app/src/main/java/io/legado/app/ui/book/toc/ChapterListAdapter.kt +++ b/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 { ContentProcessor.get(it.name, it.origin).getReplaceRules() } + val useReplace get() = callback.book?.getUseReplaceRule() == true val cacheFileNames = hashSetOf() val diffCallBack = object : DiffUtil.ItemCallback() { @@ -61,7 +62,7 @@ class ChapterListAdapter(context: Context, val callback: Callback) : } else { tvChapterName.setTextColor(context.getCompatColor(R.color.primaryText)) } - tvChapterName.text = item.getDisplayTitle(replaceRules) + tvChapterName.text = item.getDisplayTitle(replaceRules, useReplace) if (item.isVolume) { //卷名,如第一卷 突出显示 tvChapterItem.setBackgroundColor(context.getCompatColor(R.color.btn_bg_press))