|
|
@ -36,6 +36,10 @@ class ThemeConfigFragment : PreferenceFragmentCompat(), SharedPreferences.OnShar |
|
|
|
override fun onSharedPreferenceChanged(sharedPreferences: SharedPreferences?, key: String?) { |
|
|
|
override fun onSharedPreferenceChanged(sharedPreferences: SharedPreferences?, key: String?) { |
|
|
|
sharedPreferences ?: return |
|
|
|
sharedPreferences ?: return |
|
|
|
when (key) { |
|
|
|
when (key) { |
|
|
|
|
|
|
|
"transparentStatusBar" -> { |
|
|
|
|
|
|
|
LiveEventBus.get().with(Bus.recreate).post("") |
|
|
|
|
|
|
|
Handler().postDelayed({ activity?.recreate() }, 100) |
|
|
|
|
|
|
|
} |
|
|
|
"colorPrimary", "colorAccent", "colorBackground" -> |
|
|
|
"colorPrimary", "colorAccent", "colorBackground" -> |
|
|
|
if (backgroundIsDark(sharedPreferences)) { |
|
|
|
if (backgroundIsDark(sharedPreferences)) { |
|
|
|
activity?.let { |
|
|
|
activity?.let { |
|
|
|