From d23e611fcf596a46be02f3b54d7a8cad4895c7c7 Mon Sep 17 00:00:00 2001 From: Xwite <82232510+Xwite@users.noreply.github.com> Date: Mon, 3 Oct 2022 07:01:21 +0800 Subject: [PATCH] fix: isImportBookOnLine --- .../java/io/legado/app/ui/book/info/BookInfoViewModel.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/book/info/BookInfoViewModel.kt b/app/src/main/java/io/legado/app/ui/book/info/BookInfoViewModel.kt index 7fcf16f7d..1db43d131 100644 --- a/app/src/main/java/io/legado/app/ui/book/info/BookInfoViewModel.kt +++ b/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 { @@ -315,4 +315,4 @@ class BookInfoViewModel(application: Application) : BaseViewModel(application) { } } -} \ No newline at end of file +}