pull/1876/head^2
kunfei 3 years ago
parent d3d0e0e1d2
commit d34e3dbdc8
  1. 4
      app/src/main/java/io/legado/app/ui/book/toc/ChapterListAdapter.kt

@ -60,7 +60,6 @@ class ChapterListAdapter(context: Context, val callback: Callback) :
get() = callback.book?.let {
ContentProcessor.get(it.name, it.origin).getTitleReplaceRules()
}
private var useReplace = AppConfig.tocUiUseReplace && callback.book?.getUseReplaceRule() == true
private var upDisplayTileJob: Coroutine<*>? = null
override fun onCurrentListChanged() {
@ -69,7 +68,6 @@ class ChapterListAdapter(context: Context, val callback: Callback) :
}
fun clearDisplayTitle() {
useReplace = AppConfig.tocUiUseReplace && callback.book?.getUseReplaceRule() == true
upDisplayTileJob?.cancel()
displayTitleMap.clear()
}
@ -78,7 +76,7 @@ class ChapterListAdapter(context: Context, val callback: Callback) :
upDisplayTileJob?.cancel()
upDisplayTileJob = Coroutine.async(callback.scope) {
val replaceRules = replaceRules
val useReplace = useReplace
val useReplace = AppConfig.tocUiUseReplace && callback.book?.getUseReplaceRule() == true
val items = getItems()
async {
for (i in startIndex until items.size) {

Loading…
Cancel
Save