mirror of
https://github.com/fork-maintainers/iceraven-browser
synced 2024-11-02 03:40:16 +00:00
For #1658 Update preferredColorScheme in onResume for auto-theming
This commit is contained in:
parent
47c04de886
commit
9eaaedf4bd
@ -299,6 +299,13 @@ class BrowserFragment : Fragment(), BackHandler, CoroutineScope {
|
||||
|
||||
override fun onResume() {
|
||||
super.onResume()
|
||||
context?.components?.core?.let {
|
||||
val preferredColorScheme = it.getPreferredColorScheme()
|
||||
if (it.engine.settings.preferredColorScheme != preferredColorScheme) {
|
||||
it.engine.settings.preferredColorScheme = preferredColorScheme
|
||||
context?.components?.useCases?.sessionUseCases?.reload?.invoke()
|
||||
}
|
||||
}
|
||||
(activity as AppCompatActivity).supportActionBar?.hide()
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user