Fixed auto-night mode triggering when the main theme is custom

This commit is contained in:
Ilya Laktyushin 2019-09-04 01:59:03 +03:00
parent 716049c9ef
commit a7ba693f8b

View File

@ -330,17 +330,6 @@ private struct AutomaticThemeSwitchParameters {
} }
private func automaticThemeShouldSwitchNow(_ parameters: AutomaticThemeSwitchParameters, currentTheme: PresentationThemeReference) -> Bool { private func automaticThemeShouldSwitchNow(_ parameters: AutomaticThemeSwitchParameters, currentTheme: PresentationThemeReference) -> Bool {
switch currentTheme {
case let .builtin(builtin):
switch builtin {
case .nightAccent, .night:
return false
default:
break
}
default:
return false
}
switch parameters.trigger { switch parameters.trigger {
case .none: case .none:
return false return false