|
|
@ -11,7 +11,6 @@ import io.legado.app.help.coroutine.Coroutine |
|
|
|
import io.legado.app.model.analyzeRule.AnalyzeUrl |
|
|
|
import io.legado.app.model.analyzeRule.AnalyzeUrl |
|
|
|
import io.legado.app.model.localBook.LocalBook |
|
|
|
import io.legado.app.model.localBook.LocalBook |
|
|
|
import io.legado.app.utils.* |
|
|
|
import io.legado.app.utils.* |
|
|
|
import kotlinx.coroutines.Dispatchers.IO |
|
|
|
|
|
|
|
import kotlinx.coroutines.Dispatchers.Main |
|
|
|
import kotlinx.coroutines.Dispatchers.Main |
|
|
|
import kotlinx.coroutines.delay |
|
|
|
import kotlinx.coroutines.delay |
|
|
|
import kotlinx.coroutines.withContext |
|
|
|
import kotlinx.coroutines.withContext |
|
|
@ -307,9 +306,7 @@ object BookHelp { |
|
|
|
private var replaceRules: List<ReplaceRule> = arrayListOf() |
|
|
|
private var replaceRules: List<ReplaceRule> = arrayListOf() |
|
|
|
|
|
|
|
|
|
|
|
@Synchronized |
|
|
|
@Synchronized |
|
|
|
suspend fun upReplaceRules() { |
|
|
|
fun upReplaceRules() { |
|
|
|
withContext(IO) { |
|
|
|
|
|
|
|
synchronized(this) { |
|
|
|
|
|
|
|
val o = bookOrigin |
|
|
|
val o = bookOrigin |
|
|
|
bookName?.let { |
|
|
|
bookName?.let { |
|
|
|
replaceRules = if (o.isNullOrEmpty()) { |
|
|
|
replaceRules = if (o.isNullOrEmpty()) { |
|
|
@ -319,8 +316,6 @@ object BookHelp { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
suspend fun disposeContent( |
|
|
|
suspend fun disposeContent( |
|
|
|
title: String, |
|
|
|
title: String, |
|
|
|