From fb7c26e69154de07e71ed0e07206d39ec6284866 Mon Sep 17 00:00:00 2001 From: Horis <821938089@qq.com> Date: Wed, 25 Jan 2023 12:58:01 +0800 Subject: [PATCH 1/6] =?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/cache/CacheViewModel.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/io/legado/app/ui/book/cache/CacheViewModel.kt b/app/src/main/java/io/legado/app/ui/book/cache/CacheViewModel.kt index 56601cc30..19e855743 100644 --- a/app/src/main/java/io/legado/app/ui/book/cache/CacheViewModel.kt +++ b/app/src/main/java/io/legado/app/ui/book/cache/CacheViewModel.kt @@ -280,7 +280,8 @@ class CacheViewModel(application: Application) : BaseViewModel(application) { exportProgress.remove(book.bookUrl) exportMsg[book.bookUrl] = it.localizedMessage ?: "ERROR" upAdapterLiveData.postValue(book.bookUrl) - it.printOnDebug() + it.printStackTrace() + AppLog.put("导出epub书籍<${book.name}>出错\n${it.localizedMessage}", it) }.onSuccess { exportProgress.remove(book.bookUrl) exportMsg[book.bookUrl] = context.getString(R.string.export_success) From 4c5d797ee9fcbfd3c9a4e10aa4dc3aa031b0a8b9 Mon Sep 17 00:00:00 2001 From: Horis <821938089@qq.com> Date: Wed, 25 Jan 2023 12:59:46 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/build.gradle | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 788b49752..61ba6047a 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -71,8 +71,9 @@ android { } applicationIdSuffix '.release' - minifyEnabled true - shrinkResources true + //临时关闭 + minifyEnabled false + //shrinkResources true proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } debug { From 727ad8cdaf0f6fc9bc217b4c38e12abe95125a1b Mon Sep 17 00:00:00 2001 From: Horis <821938089@qq.com> Date: Wed, 25 Jan 2023 13:33:50 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/build.gradle | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 61ba6047a..788b49752 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -71,9 +71,8 @@ android { } applicationIdSuffix '.release' - //临时关闭 - minifyEnabled false - //shrinkResources true + minifyEnabled true + shrinkResources true proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } debug { From 43b10666d14623f6468b1a5ada1d1f792a4ba346 Mon Sep 17 00:00:00 2001 From: Horis <821938089@qq.com> Date: Wed, 25 Jan 2023 14:08:40 +0800 Subject: [PATCH 4/6] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/java/io/legado/app/ui/book/cache/CacheViewModel.kt | 1 - 1 file changed, 1 deletion(-) diff --git a/app/src/main/java/io/legado/app/ui/book/cache/CacheViewModel.kt b/app/src/main/java/io/legado/app/ui/book/cache/CacheViewModel.kt index 19e855743..6c29153c1 100644 --- a/app/src/main/java/io/legado/app/ui/book/cache/CacheViewModel.kt +++ b/app/src/main/java/io/legado/app/ui/book/cache/CacheViewModel.kt @@ -483,7 +483,6 @@ class CacheViewModel(application: Application) : BaseViewModel(application) { val stream = ByteArrayOutputStream() resource.compress(Bitmap.CompressFormat.JPEG, 100, stream) val byteArray: ByteArray = stream.toByteArray() - resource.recycle() stream.close() epubBook.coverImage = Resource(byteArray, "Images/cover.jpg") } From f5702ccbcfc64e113d6086bc605dd94eb8b7881a Mon Sep 17 00:00:00 2001 From: Horis <821938089@qq.com> Date: Wed, 25 Jan 2023 14:13:44 +0800 Subject: [PATCH 5/6] =?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/association/VerificationCodeDialog.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 db7e4d65a..11c53e6c1 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 @@ -103,7 +103,8 @@ class VerificationCodeDialog() : BaseDialogFragment(R.layout.dialog_verification transition: Transition? ) { view ?: return - ImageProvider.bitmapLruCache.put(url, resource) + val bitmap = resource.copy(resource.config, true) + ImageProvider.bitmapLruCache.put(url, bitmap) binding.verificationCodeImageView.setImageBitmap(resource) } From 1fa90fff1dd66c6aadd3b741c2168253275b38d8 Mon Sep 17 00:00:00 2001 From: Horis <821938089@qq.com> Date: Wed, 25 Jan 2023 14:18:31 +0800 Subject: [PATCH 6/6] =?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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 11c53e6c1..a8d9af42b 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 @@ -105,7 +105,7 @@ class VerificationCodeDialog() : BaseDialogFragment(R.layout.dialog_verification view ?: return val bitmap = resource.copy(resource.config, true) ImageProvider.bitmapLruCache.put(url, bitmap) - binding.verificationCodeImageView.setImageBitmap(resource) + binding.verificationCodeImageView.setImageBitmap(bitmap) } override fun onLoadCleared(placeholder: Drawable?) {