feat: 下载界面添加分组

pull/248/head
gedoor 5 years ago
parent 0eb6ce8c06
commit bb0e4c6b98
  1. 15
      app/src/main/java/io/legado/app/ui/main/my/MyFragment.kt

@ -145,10 +145,23 @@ class MyFragment : BaseFragment(R.layout.fragment_my_config), FileChooserDialog.
postEvent(EventBus.RECREATE, "") postEvent(EventBus.RECREATE, "")
} else { } else {
ReadBookConfig.pageAnim = getPrefInt("lastReadBookPageAnim") ReadBookConfig.pageAnim = getPrefInt("lastReadBookPageAnim")
if (getPrefBoolean("lastIsNightTheme")) {
putPrefInt("colorPrimaryNight", getPrefInt("lastColorPrimary"))
putPrefInt("colorAccentNight", getPrefInt("lastColorAccent"))
putPrefInt("colorBackgroundNight", getPrefInt("lastColorBackground"))
putPrefInt(
"colorBottomBackgroundNight",
getPrefInt("lastColorBottomBackground")
)
} else {
putPrefInt("colorPrimary", getPrefInt("lastColorPrimary")) putPrefInt("colorPrimary", getPrefInt("lastColorPrimary"))
putPrefInt("colorAccent", getPrefInt("lastColorAccent")) putPrefInt("colorAccent", getPrefInt("lastColorAccent"))
putPrefInt("colorBackground", getPrefInt("lastColorBackground")) putPrefInt("colorBackground", getPrefInt("lastColorBackground"))
putPrefInt("colorBottomBackground", getPrefInt("lastColorBottomBackground")) putPrefInt(
"colorBottomBackground",
getPrefInt("lastColorBottomBackground")
)
}
AppConfig.isNightTheme = getPrefBoolean("lastIsNightTheme") AppConfig.isNightTheme = getPrefBoolean("lastIsNightTheme")
App.INSTANCE.applyDayNight() App.INSTANCE.applyDayNight()
postEvent(EventBus.RECREATE, "") postEvent(EventBus.RECREATE, "")

Loading…
Cancel
Save