From 3f58e3ba3f22e18f17bf511ae8bbd55eecc5a485 Mon Sep 17 00:00:00 2001 From: ALin Date: Sat, 27 Aug 2022 19:33:48 -0700 Subject: [PATCH 1/4] =?UTF-8?q?fix:=20fix=20wrong=20eink=20mode=20check=20?= =?UTF-8?q?|=20anim=20boolean=E5=80=BC=E5=86=99=E5=8F=8D=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/java/io/legado/app/ui/book/read/ReadMenu.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/book/read/ReadMenu.kt b/app/src/main/java/io/legado/app/ui/book/read/ReadMenu.kt index 174b06dad..bc743164c 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/ReadMenu.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/ReadMenu.kt @@ -201,7 +201,7 @@ class ReadMenu @JvmOverloads constructor( activity?.window?.attributes = params } - fun runMenuIn(anim: Boolean = AppConfig.isEInkMode) { + fun runMenuIn(anim: Boolean = !AppConfig.isEInkMode) { this.visible() binding.titleBar.visible() binding.bottomMenu.visible() @@ -214,7 +214,7 @@ class ReadMenu @JvmOverloads constructor( } } - fun runMenuOut(anim: Boolean = AppConfig.isEInkMode, onMenuOutEnd: (() -> Unit)? = null) { + fun runMenuOut(anim: Boolean = !AppConfig.isEInkMode, onMenuOutEnd: (() -> Unit)? = null) { this.onMenuOutEnd = onMenuOutEnd if (this.isVisible) { if (anim) { From 85d71844398a99ab0da36929bf81341873b56f94 Mon Sep 17 00:00:00 2001 From: ALin Date: Sat, 27 Aug 2022 19:51:45 -0700 Subject: [PATCH 2/4] =?UTF-8?q?feat:=20=E5=A2=A8=E6=B0=B4=E5=B1=8F?= =?UTF-8?q?=E6=A8=A1=E5=BC=8F=E4=B8=8B=EF=BC=8C=E4=B9=A6=E7=B1=8D=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E9=A1=B5=E4=B8=8D=E6=98=BE=E7=A4=BA=E6=A8=A1=E7=B3=8A?= =?UTF-8?q?=E4=B9=A6=E7=B1=8D=E5=B0=81=E9=9D=A2=E4=BD=9C=E4=B8=BA=E8=83=8C?= =?UTF-8?q?=E6=99=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/io/legado/app/ui/book/info/BookInfoActivity.kt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/book/info/BookInfoActivity.kt b/app/src/main/java/io/legado/app/ui/book/info/BookInfoActivity.kt index 17be57e48..bc57da9dd 100644 --- a/app/src/main/java/io/legado/app/ui/book/info/BookInfoActivity.kt +++ b/app/src/main/java/io/legado/app/ui/book/info/BookInfoActivity.kt @@ -21,6 +21,7 @@ import io.legado.app.data.entities.BookChapter import io.legado.app.data.entities.BookSource import io.legado.app.databinding.ActivityBookInfoBinding import io.legado.app.databinding.DialogEditTextBinding +import io.legado.app.help.config.AppConfig import io.legado.app.lib.dialogs.alert import io.legado.app.lib.theme.backgroundColor import io.legado.app.lib.theme.bottomBackground @@ -247,8 +248,10 @@ class BookInfoActivity : private fun showCover(book: Book) { binding.ivCover.load(book.getDisplayCover(), book.name, book.author, false, book.origin) - BookCover.loadBlur(this, book.getDisplayCover()) - .into(binding.bgBook) + if(!AppConfig.isEInkMode) { + BookCover.loadBlur(this, book.getDisplayCover()) + .into(binding.bgBook) + } } private fun upLoading(isLoading: Boolean, chapterList: List? = null) { From f411ef7cce54ac4a0e71dc268f2fc49555b62193 Mon Sep 17 00:00:00 2001 From: ALin Date: Sat, 27 Aug 2022 20:12:19 -0700 Subject: [PATCH 3/4] fix: using SimpleDateFormat from java.text instead of android.icu.text to be compatible with api less than 24 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 项目设置里最低api要求为21,但android.icu.text.SimpleDateFormat要求最低api24,更换为了java.text.SimpleDateFormat来支持21~23版本API --- app/src/main/java/io/legado/app/ui/about/ReadRecordActivity.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/io/legado/app/ui/about/ReadRecordActivity.kt b/app/src/main/java/io/legado/app/ui/about/ReadRecordActivity.kt index f323789a6..3984fbdda 100644 --- a/app/src/main/java/io/legado/app/ui/about/ReadRecordActivity.kt +++ b/app/src/main/java/io/legado/app/ui/about/ReadRecordActivity.kt @@ -1,7 +1,7 @@ package io.legado.app.ui.about +import java.text.SimpleDateFormat import android.content.Context -import android.icu.text.SimpleDateFormat import android.os.Bundle import android.view.Menu import android.view.MenuItem From 19e7b58dd8f90faf8acaf48942f51e7dac9e3a36 Mon Sep 17 00:00:00 2001 From: Xwite <1797350009@qq.com> Date: Mon, 29 Aug 2022 08:49:17 +0800 Subject: [PATCH 4/4] fix: change epub file copy position BookHelp.clearInvalidCache will delete epub file, move to book folder rather than cache folder fix #2206 --- app/src/main/java/io/legado/app/help/BookHelp.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/io/legado/app/help/BookHelp.kt b/app/src/main/java/io/legado/app/help/BookHelp.kt index ac5cac99f..5bb49d90a 100644 --- a/app/src/main/java/io/legado/app/help/BookHelp.kt +++ b/app/src/main/java/io/legado/app/help/BookHelp.kt @@ -165,7 +165,7 @@ object BookHelp { fun getEpubFile(book: Book): ZipFile { val uri = Uri.parse(book.bookUrl) if (uri.isContentScheme()) { - val path = FileUtils.getPath(downloadDir, cacheFolderName, book.originName) + val path = FileUtils.getPath(downloadDir, cacheFolderName, book.getFolderName(), book.originName) val file = File(path) val doc = DocumentFile.fromSingleUri(appCtx, uri) ?: throw IOException("文件不存在")