|
|
|
@ -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) { |
|
|
|
|