From 658c6b63b1b33b152452cbe606c7c8818186da78 Mon Sep 17 00:00:00 2001 From: Horis <821938089@qq.com> Date: Mon, 17 Oct 2022 10:17:12 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../legado/app/ui/book/changesource/ChangeBookSourceDialog.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/io/legado/app/ui/book/changesource/ChangeBookSourceDialog.kt b/app/src/main/java/io/legado/app/ui/book/changesource/ChangeBookSourceDialog.kt index ffde59dca..f1d0df3aa 100644 --- a/app/src/main/java/io/legado/app/ui/book/changesource/ChangeBookSourceDialog.kt +++ b/app/src/main/java/io/legado/app/ui/book/changesource/ChangeBookSourceDialog.kt @@ -14,6 +14,7 @@ import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.RecyclerView import io.legado.app.R import io.legado.app.base.BaseDialogFragment +import io.legado.app.constant.BookType import io.legado.app.constant.EventBus import io.legado.app.data.appDb import io.legado.app.data.entities.Book @@ -242,7 +243,8 @@ class ChangeBookSourceDialog() : BaseDialogFragment(R.layout.dialog_book_change_ } override fun changeTo(searchBook: SearchBook) { - if (searchBook.type == callBack?.oldBook?.type) { + val oldBookType = callBack?.oldBook?.type?.and(BookType.updateError.inv()) + if (searchBook.type == oldBookType) { changeSource(searchBook) { dismissAllowingStateLoss() }