Browse Source

fix: isImportBookOnLine

Xwite 4 years ago
parent
commit
192bf492f6

+ 3 - 3
app/src/main/java/io/legado/app/ui/book/info/BookInfoViewModel.kt

@@ -7,7 +7,7 @@ import androidx.lifecycle.viewModelScope
 import io.legado.app.R
 import io.legado.app.R
 import io.legado.app.base.BaseViewModel
 import io.legado.app.base.BaseViewModel
 import io.legado.app.constant.AppLog
 import io.legado.app.constant.AppLog
-import io.legado.app.constant.BookType
+import io.legado.app.constant.BookSourceType
 import io.legado.app.constant.EventBus
 import io.legado.app.constant.EventBus
 import io.legado.app.data.appDb
 import io.legado.app.data.appDb
 import io.legado.app.data.entities.Book
 import io.legado.app.data.entities.Book
@@ -34,7 +34,7 @@ class BookInfoViewModel(application: Application) : BaseViewModel(application) {
     var bookSource: BookSource? = null
     var bookSource: BookSource? = null
     private var changeSourceCoroutine: Coroutine<*>? = null
     private var changeSourceCoroutine: Coroutine<*>? = null
     val isImportBookOnLine: Boolean
     val isImportBookOnLine: Boolean
-        get() = (bookSource?.bookSourceType ?: BookType.local) == BookType.webFile
+        get() = bookSource?.bookSourceType == BookSourceType.file
 
 
     fun initData(intent: Intent) {
     fun initData(intent: Intent) {
         execute {
         execute {
@@ -315,4 +315,4 @@ class BookInfoViewModel(application: Application) : BaseViewModel(application) {
         }
         }
     }
     }
 
 
-}
+}