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

Loading…
Cancel
Save