Fixed build

This commit is contained in:
Ilya Laktyushin 2019-07-19 22:48:29 +02:00
parent 42d99e399a
commit 21ad9b9ca2
2 changed files with 3 additions and 28 deletions

View File

@ -259,19 +259,7 @@ public func currentPresentationDataAndSettings(accountManager: AccountManager) -
}
let effectiveAccentColor = themeSettings.themeSpecificAccentColors[effectiveTheme.index]?.color ?? defaultDayAccentColor
switch effectiveTheme {
case let .builtin(reference):
switch reference {
case .dayClassic:
themeValue = defaultPresentationTheme
case .day:
themeValue = makeDefaultDayPresentationTheme(accentColor: effectiveAccentColor, serviceBackgroundColor: defaultServiceBackgroundColor)
case .night:
themeValue = makeDarkPresentationTheme(accentColor: effectiveAccentColor)
case .nightAccent:
themeValue = makeDarkAccentPresentationTheme(accentColor: effectiveAccentColor)
}
}
themeValue = makePresentationTheme(themeReference: effectiveTheme, accentColor: effectiveAccentColor, serviceBackgroundColor: defaultServiceBackgroundColor)
if effectiveTheme != themeSettings.theme {
switch effectiveChatWallpaper {
@ -536,20 +524,7 @@ public func updatedPresentationData(accountManager: AccountManager, applicationI
let effectiveAccentColor = themeSettings.themeSpecificAccentColors[effectiveTheme.index]?.color ?? defaultDayAccentColor
let themeValue: PresentationTheme
switch effectiveTheme {
case let .builtin(reference):
switch reference {
case .dayClassic:
themeValue = makeDefaultDayPresentationTheme(serviceBackgroundColor: serviceBackgroundColor)
case .night:
themeValue = makeDarkPresentationTheme(accentColor: effectiveAccentColor)
case .nightAccent:
themeValue = makeDarkAccentPresentationTheme(accentColor: effectiveAccentColor)
case .day:
themeValue = makeDefaultDayPresentationTheme(accentColor: effectiveAccentColor, serviceBackgroundColor: serviceBackgroundColor)
}
}
let themeValue = makePresentationTheme(themeReference: effectiveTheme, accentColor: effectiveAccentColor, serviceBackgroundColor: serviceBackgroundColor)
if effectiveTheme != themeSettings.theme && themeSettings.themeSpecificChatWallpapers[effectiveTheme.index] == nil {
switch effectiveChatWallpaper {

View File

@ -356,7 +356,7 @@ func openChatMessage(context: AccountContext, message: Message, standalone: Bool
return nil
}))
case let .theme(media):
let controller = ThemePreviewController(context: context, previewTheme: makeDefaultDayPresentationTheme(accentColor: nil, serviceBackgroundColor: .black), media: .message(message: MessageReference(message), media: media))
let controller = ThemePreviewController(context: context, previewTheme: makeDefaultDayPresentationTheme(accentColor: nil, serviceBackgroundColor: .black, day: true), media: .message(message: MessageReference(message), media: media))
present(controller, ViewControllerPresentationArguments(presentationAnimation: .modalSheet))
}
}