feat: E-Ink模式合并到主题模式里, E-Ink模式不能修改阅读界面背景和文字颜色

pull/254/head
gedoor 4 years ago
parent 1810f50153
commit 2b9363e4bf
  1. 3
      app/src/main/java/io/legado/app/App.kt
  2. 3
      app/src/main/java/io/legado/app/ui/main/my/MyFragment.kt

@ -13,6 +13,7 @@ import com.jeremyliao.liveeventbus.LiveEventBus
import io.legado.app.constant.AppConst.channelIdDownload import io.legado.app.constant.AppConst.channelIdDownload
import io.legado.app.constant.AppConst.channelIdReadAloud import io.legado.app.constant.AppConst.channelIdReadAloud
import io.legado.app.constant.AppConst.channelIdWeb import io.legado.app.constant.AppConst.channelIdWeb
import io.legado.app.constant.EventBus
import io.legado.app.constant.PreferKey import io.legado.app.constant.PreferKey
import io.legado.app.data.AppDatabase import io.legado.app.data.AppDatabase
import io.legado.app.help.ActivityHelp import io.legado.app.help.ActivityHelp
@ -22,6 +23,7 @@ import io.legado.app.help.ReadBookConfig
import io.legado.app.lib.theme.ThemeStore import io.legado.app.lib.theme.ThemeStore
import io.legado.app.utils.getCompatColor import io.legado.app.utils.getCompatColor
import io.legado.app.utils.getPrefInt import io.legado.app.utils.getPrefInt
import io.legado.app.utils.postEvent
@Suppress("DEPRECATION") @Suppress("DEPRECATION")
class App : Application() { class App : Application() {
@ -113,6 +115,7 @@ class App : Application() {
ReadBookConfig.upBg() ReadBookConfig.upBg()
applyTheme() applyTheme()
initNightMode() initNightMode()
postEvent(EventBus.RECREATE, "")
} }
private fun initNightMode() { private fun initNightMode() {

@ -65,6 +65,9 @@ class MyFragment : BaseFragment(R.layout.fragment_my_config), FileChooserDialog.
BackupRestoreUi.onActivityResult(requestCode, resultCode, data) BackupRestoreUi.onActivityResult(requestCode, resultCode, data)
} }
/**
* 配置
*/
class PreferenceFragment : PreferenceFragmentCompat(), class PreferenceFragment : PreferenceFragmentCompat(),
SharedPreferences.OnSharedPreferenceChangeListener { SharedPreferences.OnSharedPreferenceChangeListener {

Loading…
Cancel
Save