From ff6f4bf6eedb29cea3e83a0e6ad961db609f8513 Mon Sep 17 00:00:00 2001 From: gedoor Date: Thu, 6 May 2021 17:20:17 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A2=84=E4=B8=8B=E8=BD=BD=E7=AB=A0=E8=8A=82?= =?UTF-8?q?=E5=8F=AF=E8=B0=83=E6=95=B4=E6=95=B0=E7=9B=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/io/legado/app/ui/config/OtherConfigFragment.kt | 6 ++++++ app/src/main/res/values-zh-rHK/strings.xml | 2 +- app/src/main/res/values-zh-rTW/strings.xml | 2 +- app/src/main/res/values-zh/strings.xml | 2 +- app/src/main/res/values/strings.xml | 2 +- 5 files changed, 10 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/config/OtherConfigFragment.kt b/app/src/main/java/io/legado/app/ui/config/OtherConfigFragment.kt index d5d0b1364..527d84732 100644 --- a/app/src/main/java/io/legado/app/ui/config/OtherConfigFragment.kt +++ b/app/src/main/java/io/legado/app/ui/config/OtherConfigFragment.kt @@ -53,6 +53,7 @@ class OtherConfigFragment : BasePreferenceFragment(), putPrefBoolean(PreferKey.processText, isProcessTextEnabled()) addPreferencesFromResource(R.xml.pref_config_other) upPreferenceSummary(PreferKey.userAgent, AppConfig.userAgent) + upPreferenceSummary(PreferKey.preDownloadNum, AppConfig.preDownloadNum.toString()) upPreferenceSummary(PreferKey.threadCount, AppConfig.threadCount.toString()) upPreferenceSummary(PreferKey.webPort, webPort.toString()) upPreferenceSummary(PreferKey.defaultCover, getPrefString(PreferKey.defaultCover)) @@ -114,6 +115,9 @@ class OtherConfigFragment : BasePreferenceFragment(), override fun onSharedPreferenceChanged(sharedPreferences: SharedPreferences?, key: String?) { when (key) { + PreferKey.preDownloadNum -> { + upPreferenceSummary(key, AppConfig.preDownloadNum.toString()) + } PreferKey.threadCount -> { upPreferenceSummary(key, AppConfig.threadCount.toString()) postEvent(PreferKey.threadCount, "") @@ -149,6 +153,8 @@ class OtherConfigFragment : BasePreferenceFragment(), private fun upPreferenceSummary(preferenceKey: String, value: String?) { val preference = findPreference(preferenceKey) ?: return when (preferenceKey) { + PreferKey.preDownloadNum -> preference.summary = + getString(R.string.pre_download_s, value) PreferKey.threadCount -> preference.summary = getString(R.string.threads_num, value) PreferKey.webPort -> preference.summary = getString(R.string.web_port_summary, value) else -> if (preference is ListPreference) { diff --git a/app/src/main/res/values-zh-rHK/strings.xml b/app/src/main/res/values-zh-rHK/strings.xml index 7ae5fa882..9e66af1f0 100644 --- a/app/src/main/res/values-zh-rHK/strings.xml +++ b/app/src/main/res/values-zh-rHK/strings.xml @@ -800,7 +800,7 @@ 导出书单 导入书单 预下载 - 预先下载%d章正文 + 预先下载%s章正文 启用排序 背景图片 导出文件夹 diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml index 486ec2e49..de3414c63 100644 --- a/app/src/main/res/values-zh-rTW/strings.xml +++ b/app/src/main/res/values-zh-rTW/strings.xml @@ -804,7 +804,7 @@ 匯出書單 匯入書單 預下載 - 預先下載%d章正文 + 預先下載%s章正文 啟用排序 背景圖片 匯出資料夾 diff --git a/app/src/main/res/values-zh/strings.xml b/app/src/main/res/values-zh/strings.xml index f29989897..e25c7283c 100644 --- a/app/src/main/res/values-zh/strings.xml +++ b/app/src/main/res/values-zh/strings.xml @@ -804,7 +804,7 @@ 导出书单 导入书单 预下载 - 预先下载%d章正文 + 预先下载%s章正文 启用排序 背景图片 导出文件夹 diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index ce9bfc9fa..2b302583a 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -805,7 +805,7 @@ 导出书单 导入书单 预下载 - 预先下载%d章正文 + 预先下载%s章正文 启用排序 背景图片 导出文件夹