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 26bf8c2b3..e5eebd612 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 @@ -20,7 +20,9 @@ import io.legado.app.utils.getCompatColor import io.legado.app.utils.gone import io.legado.app.utils.longToastOnUi import io.legado.app.utils.visible -import kotlinx.coroutines.* +import kotlinx.coroutines.CoroutineScope +import kotlinx.coroutines.ensureActive +import kotlinx.coroutines.launch import java.util.concurrent.ConcurrentHashMap class ChapterListAdapter(context: Context, val callback: Callback) : @@ -138,23 +140,24 @@ class ChapterListAdapter(context: Context, val callback: Callback) : //普通章节 保持不变 tvChapterItem.background = ThemeUtils.resolveDrawable(context, android.R.attr.selectableItemBackground) - - //卷名不显示 - if (!item.tag.isNullOrEmpty()) { - //更新时间规则 - tvTag.text = item.tag - tvTag.visible() - } else { - tvTag.gone() - } - if (!item.wordCount.isNullOrEmpty()) { - //章节字数 - tvWordCount.text = item.wordCount - tvWordCount.visible() - } else { - tvWordCount.gone() - } } + + //卷名不显示 + if (!item.tag.isNullOrEmpty() && !item.isVolume) { + //更新时间规则 + tvTag.text = item.tag + tvTag.visible() + } else { + tvTag.gone() + } + if (!item.wordCount.isNullOrEmpty() && !item.isVolume) { + //章节字数 + tvWordCount.text = item.wordCount + tvWordCount.visible() + } else { + tvWordCount.gone() + } + upHasCache(binding, isDur, cached) } else { tvChapterName.text = getDisplayTitle(item)