fix: isImportBookOnLine

pull/2368/head
Xwite 2 years ago committed by GitHub
parent b1dd1f8002
commit d23e611fcf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      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.base.BaseViewModel
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.data.appDb
import io.legado.app.data.entities.Book
@ -34,7 +34,7 @@ class BookInfoViewModel(application: Application) : BaseViewModel(application) {
var bookSource: BookSource? = null
private var changeSourceCoroutine: Coroutine<*>? = null
val isImportBookOnLine: Boolean
get() = (bookSource?.bookSourceType ?: BookType.local) == BookType.webFile
get() = bookSource?.bookSourceType == BookSourceType.file
fun initData(intent: Intent) {
execute {

Loading…
Cancel
Save