From 59e9f3213d16ff0ff8d5e69ddcc3527dc623c447 Mon Sep 17 00:00:00 2001 From: Horis <821938089@qq.com> Date: Sat, 24 Dec 2022 15:26:50 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/io/legado/app/ui/association/VerificationCodeDialog.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/main/java/io/legado/app/ui/association/VerificationCodeDialog.kt b/app/src/main/java/io/legado/app/ui/association/VerificationCodeDialog.kt index 5fb583ca7..db7e4d65a 100644 --- a/app/src/main/java/io/legado/app/ui/association/VerificationCodeDialog.kt +++ b/app/src/main/java/io/legado/app/ui/association/VerificationCodeDialog.kt @@ -102,6 +102,7 @@ class VerificationCodeDialog() : BaseDialogFragment(R.layout.dialog_verification resource: Bitmap, transition: Transition? ) { + view ?: return ImageProvider.bitmapLruCache.put(url, resource) binding.verificationCodeImageView.setImageBitmap(resource) } From 08b89b98441c96d5b112e3e730771faabbd12252 Mon Sep 17 00:00:00 2001 From: Horis <821938089@qq.com> Date: Sat, 24 Dec 2022 16:41:55 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../io/legado/app/ui/book/explore/ExploreShowActivity.kt | 6 +++++- .../java/io/legado/app/ui/book/search/SearchActivity.kt | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/book/explore/ExploreShowActivity.kt b/app/src/main/java/io/legado/app/ui/book/explore/ExploreShowActivity.kt index 03c765cf9..161a98c38 100644 --- a/app/src/main/java/io/legado/app/ui/book/explore/ExploreShowActivity.kt +++ b/app/src/main/java/io/legado/app/ui/book/explore/ExploreShowActivity.kt @@ -84,7 +84,11 @@ class ExploreShowActivity : VMBaseActivity Date: Sat, 24 Dec 2022 17:15:00 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/io/legado/app/ui/book/info/BookInfoViewModel.kt | 3 +++ 1 file changed, 3 insertions(+) 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 982fa6645..70277a37b 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 @@ -150,6 +150,9 @@ class BookInfoViewModel(application: Application) : BaseViewModel(application) { bookSource?.let { bookSource -> WebBook.getBookInfo(this, bookSource, book, canReName = canReName) .onSuccess(IO) { + appDb.bookDao.getBook(book.name, book.author)?.let { + inBookshelf = true + } bookData.postValue(book) if (isImportBookOnLine) { appDb.searchBookDao.update(book.toSearchBook())