Various Improvements

This commit is contained in:
Ilya Laktyushin
2021-10-22 18:59:41 +04:00
parent 6c38a5a68f
commit d60588b3f1
30 changed files with 690 additions and 206 deletions

View File

@@ -623,9 +623,16 @@ public func updatedPresentationData(accountManager: AccountManager<TelegramAccou
switchedToNightModeWallpaper = true
}
effectiveTheme = automaticTheme
preferredBaseTheme = .night
if let baseTheme = themeSettings.themePreferredBaseTheme[effectiveTheme.index], [.night, .tinted].contains(baseTheme) {
preferredBaseTheme = baseTheme
} else {
preferredBaseTheme = .night
}
} else {
effectiveTheme = themeSettings.theme
if let baseTheme = themeSettings.themePreferredBaseTheme[effectiveTheme.index], [.classic, .day].contains(baseTheme) {
preferredBaseTheme = baseTheme
}
}
if let colors = effectiveColors, colors.baseColor == .theme {