From f71e18c164c2cd5852e1e2c79a10b4976e26292d Mon Sep 17 00:00:00 2001 From: gedoor Date: Thu, 25 Jun 2020 12:29:56 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20E-Ink=E6=A8=A1=E5=BC=8F=E5=90=88?= =?UTF-8?q?=E5=B9=B6=E5=88=B0=E4=B8=BB=E9=A2=98=E6=A8=A1=E5=BC=8F=E9=87=8C?= =?UTF-8?q?,=20E-Ink=E6=A8=A1=E5=BC=8F=E4=B8=8D=E8=83=BD=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E9=98=85=E8=AF=BB=E7=95=8C=E9=9D=A2=E8=83=8C=E6=99=AF=E5=92=8C?= =?UTF-8?q?=E6=96=87=E5=AD=97=E9=A2=9C=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/java/io/legado/app/constant/PreferKey.kt | 1 - app/src/main/java/io/legado/app/help/AppConfig.kt | 7 ++++--- app/src/main/res/values-zh-rHK/arrays.xml | 1 + app/src/main/res/values-zh-rTW/arrays.xml | 1 + app/src/main/res/values/array_values.xml | 1 + app/src/main/res/values/arrays.xml | 1 + app/src/main/res/xml/pref_main.xml | 8 -------- 7 files changed, 8 insertions(+), 12 deletions(-) diff --git a/app/src/main/java/io/legado/app/constant/PreferKey.kt b/app/src/main/java/io/legado/app/constant/PreferKey.kt index e82154432..8236536ca 100644 --- a/app/src/main/java/io/legado/app/constant/PreferKey.kt +++ b/app/src/main/java/io/legado/app/constant/PreferKey.kt @@ -43,7 +43,6 @@ object PreferKey { const val readStyleSelect = "readStyleSelect" const val systemTypefaces = "system_typefaces" const val readBodyToLh = "readBodyToLh" - const val eInkMode = "isEInkMode" const val textFullJustify = "textFullJustify" const val autoReadSpeed = "autoReadSpeed" diff --git a/app/src/main/java/io/legado/app/help/AppConfig.kt b/app/src/main/java/io/legado/app/help/AppConfig.kt index 2ebd8f47a..5e98ae482 100644 --- a/app/src/main/java/io/legado/app/help/AppConfig.kt +++ b/app/src/main/java/io/legado/app/help/AppConfig.kt @@ -13,6 +13,7 @@ object AppConfig { return when (context.getPrefString(PreferKey.themeMode, "0")) { "1" -> false "2" -> true + "3" -> false else -> context.sysIsDarkMode() } } @@ -27,6 +28,9 @@ object AppConfig { } } + val isEInkMode: Boolean + get() = App.INSTANCE.getPrefString(PreferKey.themeMode) == "3" + var isTransparentStatusBar: Boolean get() = App.INSTANCE.getPrefBoolean("transparentStatusBar") set(value) { @@ -80,9 +84,6 @@ object AppConfig { val ttsSpeechPer: String get() = App.INSTANCE.getPrefString(PreferKey.ttsSpeechPer) ?: "0" - val isEInkMode: Boolean - get() = App.INSTANCE.getPrefBoolean(PreferKey.eInkMode) - val clickAllNext: Boolean get() = App.INSTANCE.getPrefBoolean(PreferKey.clickAllNext, false) var chineseConverterType: Int diff --git a/app/src/main/res/values-zh-rHK/arrays.xml b/app/src/main/res/values-zh-rHK/arrays.xml index b99ad1992..315f18e35 100644 --- a/app/src/main/res/values-zh-rHK/arrays.xml +++ b/app/src/main/res/values-zh-rHK/arrays.xml @@ -20,6 +20,7 @@ 跟隨系統 亮色主題 暗色主題 + E-Ink(墨水屏) diff --git a/app/src/main/res/values-zh-rTW/arrays.xml b/app/src/main/res/values-zh-rTW/arrays.xml index 4efd0c56f..5d4e2aaeb 100644 --- a/app/src/main/res/values-zh-rTW/arrays.xml +++ b/app/src/main/res/values-zh-rTW/arrays.xml @@ -44,6 +44,7 @@ 跟隨系統 亮色主題 暗色主題 + E-Ink(墨水屏) diff --git a/app/src/main/res/values/array_values.xml b/app/src/main/res/values/array_values.xml index 40bc6684e..b6b32fa5b 100644 --- a/app/src/main/res/values/array_values.xml +++ b/app/src/main/res/values/array_values.xml @@ -23,6 +23,7 @@ 0 1 2 + 3 diff --git a/app/src/main/res/values/arrays.xml b/app/src/main/res/values/arrays.xml index e8a99ff2a..5b580aeb3 100644 --- a/app/src/main/res/values/arrays.xml +++ b/app/src/main/res/values/arrays.xml @@ -44,6 +44,7 @@ 跟随系统 亮色主题 暗色主题 + E-Ink(墨水屏) diff --git a/app/src/main/res/xml/pref_main.xml b/app/src/main/res/xml/pref_main.xml index 72a02e97a..37b223d60 100644 --- a/app/src/main/res/xml/pref_main.xml +++ b/app/src/main/res/xml/pref_main.xml @@ -30,14 +30,6 @@ android:icon="@drawable/ic_cfg_theme" app:iconSpaceReserved="false" /> - -