From fd1fa2a45317071659017b6f85092ce0c7c905ad Mon Sep 17 00:00:00 2001 From: HapeLee <1321903405@qq.com> Date: Sat, 29 Nov 2025 13:29:59 +0800 Subject: [PATCH] =?UTF-8?q?=E7=9B=AE=E5=BD=95=E6=B7=BB=E5=8A=A0=E5=AE=9A?= =?UTF-8?q?=E4=BD=8D=E6=A0=87=E8=AF=86=20#383?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../io/legado/app/ui/book/toc/ChapterListAdapter.kt | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) 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 f8d3bec19..7b948967a 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 @@ -335,12 +335,10 @@ class ChapterListAdapter( } else tvWordCount.gone() if (item.isVip && !item.isPay) ivLocked.visible() else ivLocked.gone() - - upHasCache(binding, cached) } else { tvChapterName.text = getDisplayTitle(item) - upHasCache(binding, cached) } + upHasCache(binding, cached, isDur) when { item.isVolume -> { @@ -403,8 +401,11 @@ class ChapterListAdapter( } } - private fun upHasCache(binding: ItemChapterListBinding, cached: Boolean) = binding.apply { - ivChecked.setImageResource(if (cached) R.drawable.ic_download_done else R.drawable.ic_outline_cloud_24) + private fun upHasCache(binding: ItemChapterListBinding, cached: Boolean, isDur: Boolean = false) = binding.apply { + ivChecked.setImageResource( + if (cached) R.drawable.ic_download_done + else if (isDur) R.drawable.ic_locate + else R.drawable.ic_outline_cloud_24) } interface Callback {