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) } 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 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()) diff --git a/app/src/main/java/io/legado/app/ui/book/search/SearchActivity.kt b/app/src/main/java/io/legado/app/ui/book/search/SearchActivity.kt index d48ffc8ad..e5d3cfc21 100644 --- a/app/src/main/java/io/legado/app/ui/book/search/SearchActivity.kt +++ b/app/src/main/java/io/legado/app/ui/book/search/SearchActivity.kt @@ -408,7 +408,11 @@ class SearchActivity : VMBaseActivity