fix(Book): isLocalBook

* book.origin以webDav开头时,isLocalBook此时应该返回true
pull/2365/head
Xwite 2 years ago
parent c6c0cf1ac1
commit 28808b8671
  1. 5
      app/src/main/java/io/legado/app/data/entities/Book.kt

@ -14,6 +14,7 @@ import io.legado.app.model.ReadBook
import io.legado.app.utils.GSON import io.legado.app.utils.GSON
import io.legado.app.utils.MD5Utils import io.legado.app.utils.MD5Utils
import io.legado.app.utils.fromJsonObject import io.legado.app.utils.fromJsonObject
import io.legado.app.utils.isUri
import kotlinx.coroutines.runBlocking import kotlinx.coroutines.runBlocking
import kotlinx.parcelize.IgnoredOnParcel import kotlinx.parcelize.IgnoredOnParcel
import kotlinx.parcelize.Parcelize import kotlinx.parcelize.Parcelize
@ -108,7 +109,9 @@ data class Book(
) : Parcelable, BaseBook { ) : Parcelable, BaseBook {
fun isLocalBook(): Boolean { fun isLocalBook(): Boolean {
return origin == BookType.local //通过判断书籍链接来判断http* file:// content://
//origin判断不可靠 http* BookType.local webDav::
return origin == BookType.local || bookUrl.isUri()
} }
fun isLocalTxt(): Boolean { fun isLocalTxt(): Boolean {

Loading…
Cancel
Save