Skip to content

Commit

Permalink
Bugfix #9788 [v98] System theme not changing when enabled in settings (
Browse files Browse the repository at this point in the history
…#9850)

* Update ThemeSettingsController.swift - System theme not changing when enabled in settings
  • Loading branch information
junbio authored Jan 25, 2022
1 parent 5bd3d70 commit 1591b48
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Client/Frontend/Settings/ThemeSettingsController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,10 @@ class ThemeSettingsController: ThemedTableViewController {
@objc func systemThemeSwitchValueChanged(control: UISwitch) {
LegacyThemeManager.instance.systemThemeIsOn = control.isOn

let userInterfaceStyle = traitCollection.userInterfaceStyle
if control.isOn {
// Reset the user interface style to the default before choosing our theme
UIApplication.shared.delegate?.window??.overrideUserInterfaceStyle = .unspecified
let userInterfaceStyle = traitCollection.userInterfaceStyle
LegacyThemeManager.instance.current = userInterfaceStyle == .dark ? DarkTheme() : NormalTheme()
} else if LegacyThemeManager.instance.automaticBrightnessIsOn {
LegacyThemeManager.instance.updateCurrentThemeBasedOnScreenBrightness()
Expand Down

0 comments on commit 1591b48

Please sign in to comment.