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章正文 启用排序 背景图片 导出文件夹