优化恢复

pull/346/head
gedoor 4 years ago
parent 41b120c0a6
commit 09a097eb57
  1. 9
      app/src/main/java/io/legado/app/help/storage/Restore.kt
  2. 1
      app/src/main/res/values-zh-rHK/strings.xml
  3. 1
      app/src/main/res/values-zh-rTW/strings.xml
  4. 1
      app/src/main/res/values-zh/strings.xml
  5. 1
      app/src/main/res/values/strings.xml

@ -39,7 +39,8 @@ object Restore {
"readConfig",
PreferKey.themeMode,
PreferKey.bookshelfLayout,
PreferKey.showRss
PreferKey.showRss,
PreferKey.threadCount
)
//忽略标题
@ -47,7 +48,8 @@ object Restore {
App.INSTANCE.getString(R.string.read_config),
App.INSTANCE.getString(R.string.theme_mode),
App.INSTANCE.getString(R.string.bookshelf_layout),
App.INSTANCE.getString(R.string.show_rss)
App.INSTANCE.getString(R.string.show_rss),
App.INSTANCE.getString(R.string.thread_count)
)
//默认忽略keys
@ -219,6 +221,7 @@ object Restore {
PreferKey.themeMode == key && ignoreThemeMode -> false
PreferKey.bookshelfLayout == key && ignoreBookshelfLayout -> false
PreferKey.showRss == key && ignoreShowRss -> false
PreferKey.threadCount == key && ignoreThreadCount -> false
else -> true
}
}
@ -231,6 +234,8 @@ object Restore {
get() = ignoreConfig[PreferKey.bookshelfLayout] == true
private val ignoreShowRss: Boolean
get() = ignoreConfig[PreferKey.showRss] == true
private val ignoreThreadCount: Boolean
get() = ignoreConfig[PreferKey.threadCount] == true
fun saveIgnoreConfig() {
val json = GSON.toJson(ignoreConfig)

@ -750,4 +750,5 @@
<string name="read_record">阅读记录</string>
<string name="read_record_summary">阅读时间记录</string>
<string name="local_tts">本地TTS</string>
<string name="thread_count">线程数</string>
</resources>

@ -750,5 +750,6 @@
<string name="read_record">阅读记录</string>
<string name="read_record_summary">阅读时间记录</string>
<string name="local_tts">本地TTS</string>
<string name="thread_count">线程数</string>
</resources>

@ -750,4 +750,5 @@
<string name="read_record">阅读记录</string>
<string name="read_record_summary">阅读时间记录</string>
<string name="local_tts">本地TTS</string>
<string name="thread_count">线程数</string>
</resources>

@ -751,5 +751,6 @@
<string name="read_record">阅读记录</string>
<string name="read_record_summary">阅读时间记录</string>
<string name="local_tts">本地TTS</string>
<string name="thread_count">线程数</string>
</resources>
Loading…
Cancel
Save