diff --git a/app/src/main/assets/readConfig.json b/app/src/main/assets/readConfig.json index 21cea9f69..ee546dc37 100644 --- a/app/src/main/assets/readConfig.json +++ b/app/src/main/assets/readConfig.json @@ -4,7 +4,7 @@ "bgType": 1, "darkStatusIcon": true, "textColor": "#5E432E", - "textSize": 22, + "textSize": 24, "letterSpacing": 0, "lineSpacingExtra": 10, "lineSpacingMultiplier": 1.2, @@ -14,11 +14,11 @@ "paddingBottom": 0 }, { - "bgStr": "新羊皮纸.jpg", - "bgType": 1, + "bgStr": "#C6BAA1", + "bgType": 0, "darkStatusIcon": true, "textColor": "#5E432E", - "textSize": 22, + "textSize": 24, "letterSpacing": 0, "lineSpacingExtra": 10, "lineSpacingMultiplier": 1.2, @@ -32,7 +32,7 @@ "bgType": 0, "darkStatusIcon": false, "textColor": "#FFFFFF", - "textSize": 22, + "textSize": 24, "letterSpacing": 0, "lineSpacingExtra": 10, "lineSpacingMultiplier": 1.2, @@ -46,7 +46,7 @@ "bgType": 1, "darkStatusIcon": false, "textColor": "#adadad", - "textSize": 22, + "textSize": 24, "letterSpacing": 0, "lineSpacingExtra": 10, "lineSpacingMultiplier": 1.2, @@ -60,7 +60,7 @@ "bgType": 0, "darkStatusIcon": false, "textColor": "#adadad", - "textSize": 22, + "textSize": 24, "letterSpacing": 0, "lineSpacingExtra": 10, "lineSpacingMultiplier": 1.2, 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 24ac981e9..446efc0bf 100644 --- a/app/src/main/java/io/legado/app/constant/PreferKey.kt +++ b/app/src/main/java/io/legado/app/constant/PreferKey.kt @@ -10,4 +10,7 @@ object PreferKey { const val nextKey = "nextKeyCode" const val showRss = "showRss" const val bookshelfLayout = "bookshelfLayout" + const val recordLog = "recordLog" + const val processText = "process_text" + const val cleanCache = "cleanCache" } \ No newline at end of file diff --git a/app/src/main/java/io/legado/app/ui/config/ConfigFragment.kt b/app/src/main/java/io/legado/app/ui/config/ConfigFragment.kt index cee764420..a4a7bd62d 100644 --- a/app/src/main/java/io/legado/app/ui/config/ConfigFragment.kt +++ b/app/src/main/java/io/legado/app/ui/config/ConfigFragment.kt @@ -12,6 +12,7 @@ import io.legado.app.App import io.legado.app.R import io.legado.app.constant.PreferKey import io.legado.app.help.BookHelp +import io.legado.app.help.FileHelp import io.legado.app.lib.theme.ATH import io.legado.app.receiver.SharedReceiverActivity import io.legado.app.ui.filechooser.FileChooserDialog @@ -59,6 +60,11 @@ class ConfigFragment : PreferenceFragmentCompat(), mode = FileChooserDialog.DIRECTORY, initPath = getPreferenceString(PreferKey.downloadPath) ) + PreferKey.cleanCache -> { + LogUtils.d("xxx","cleancaches") + FileHelp.deleteFile(getPreferenceString(PreferKey.downloadPath)) + toast("成功清理缓存") + } } return super.onPreferenceTreeClick(preference) } @@ -69,8 +75,8 @@ class ConfigFragment : PreferenceFragmentCompat(), BookHelp.upDownloadPath() findPreference(key)?.summary = getPreferenceString(key) } - "recordLog" -> LogUtils.upLevel() - "process_text" -> sharedPreferences?.let { + PreferKey.recordLog -> LogUtils.upLevel() + PreferKey.processText -> sharedPreferences?.let { setProcessTextEnable(it.getBoolean("process_text", true)) } PreferKey.showRss -> postEvent(PreferKey.showRss, PreferKey.showRss) diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 9e6327377..f4786808e 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -313,6 +313,7 @@ 替换范围,选填书名或者源名 分组 内容缓存路径 + 清理缓存 系统文件选择器 新版本 下载更新 diff --git a/app/src/main/res/xml/about.xml b/app/src/main/res/xml/about.xml index 0391f9d86..9bf6b7b71 100644 --- a/app/src/main/res/xml/about.xml +++ b/app/src/main/res/xml/about.xml @@ -5,7 +5,7 @@ + \ No newline at end of file