Fix dark appearance flag

This commit is contained in:
Ilya Laktyushin 2021-09-08 15:54:00 +03:00
parent 4a2e248432
commit b277401bef

View File

@ -1274,6 +1274,11 @@ public final class PresentationTheme: Equatable {
public let resourceCache: PresentationsResourceCache = PresentationsResourceCache()
public init(name: PresentationThemeName, index: Int64, referenceTheme: PresentationBuiltinThemeReference, overallDarkAppearance: Bool, intro: PresentationThemeIntro, passcode: PresentationThemePasscode, rootController: PresentationThemeRootController, list: PresentationThemeList, chatList: PresentationThemeChatList, chat: PresentationThemeChat, actionSheet: PresentationThemeActionSheet, contextMenu: PresentationThemeContextMenu, inAppNotification: PresentationThemeInAppNotification, chart: PresentationThemeChart, preview: Bool = false) {
var overallDarkAppearance = overallDarkAppearance
if [.night, .tinted].contains(referenceTheme.baseTheme) {
overallDarkAppearance = true
}
self.name = name
self.index = index
self.referenceTheme = referenceTheme