@ -401,8 +401,7 @@ object ReadBookConfig {
}
if (config.bgTypeEInk == 2) {
val bgName = FileUtils.getName(config.bgStrEInk)
@Suppress("BlockingMethodInNonBlockingContext") val bgPath =
FileUtils.getPath(appCtx.externalFiles, "bg", bgName)
val bgPath = FileUtils.getPath(appCtx.externalFiles, "bg", bgName)
if (!FileUtils.exist(bgPath)) {
val bgFile = FileUtils.getFile(configDir, bgName)
if (bgFile.exists()) {
@ -18,7 +18,9 @@ import kotlinx.coroutines.ensureActive
import kotlinx.coroutines.withContext
import splitties.init.appCtx
@Suppress("BlockingMethodInNonBlockingContext")
/**
* 获取目录
*/
object BookChapterList {
private val falseRegex = "\\s*(?i)(null|false|0)\\s*".toRegex()
@ -21,7 +21,9 @@ import kotlinx.coroutines.ensureActive
* 获取正文
object BookContent {
@Throws(Exception::class)
@ -14,6 +14,9 @@ import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.ensureActive
* 获取详情
object BookInfo {
@ -17,6 +17,9 @@ import kotlinx.coroutines.CoroutineScope
* 获取书籍列表
object BookList {
@ -20,7 +20,6 @@ class FileAssociationViewModel(application: Application) : BaseViewModel(applica
val openBookLiveData = MutableLiveData<String>()
val errorLiveData = MutableLiveData<String>()
fun dispatchIndent(uri: Uri) {
execute {
//如果是普通的url,需要根据返回的内容判断是什么