mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-17 11:50:56 +00:00
Fix tinted night preview
This commit is contained in:
parent
9da1b9566f
commit
bac8b1efea
@ -844,7 +844,14 @@ public func themeSettingsController(context: AccountContext, focusOnItemTag: The
|
|||||||
if let accentColor = accentColor, case let .theme(themeReference) = accentColor {
|
if let accentColor = accentColor, case let .theme(themeReference) = accentColor {
|
||||||
theme = makePresentationTheme(mediaBox: context.sharedContext.accountManager.mediaBox, themeReference: themeReference)
|
theme = makePresentationTheme(mediaBox: context.sharedContext.accountManager.mediaBox, themeReference: themeReference)
|
||||||
} else {
|
} else {
|
||||||
theme = makePresentationTheme(mediaBox: context.sharedContext.accountManager.mediaBox, themeReference: generalThemeReference, accentColor: accentColor?.accentColor, bubbleColors: accentColor?.customBubbleColors, wallpaper: accentColor?.wallpaper)
|
var wallpaperGradientColors: [UInt32]?
|
||||||
|
switch accentColor {
|
||||||
|
case let .accentColor(value):
|
||||||
|
wallpaperGradientColors = value.baseColor.wallpaperGradientColors
|
||||||
|
default:
|
||||||
|
break
|
||||||
|
}
|
||||||
|
theme = makePresentationTheme(mediaBox: context.sharedContext.accountManager.mediaBox, themeReference: generalThemeReference, accentColor: accentColor?.accentColor, bubbleColors: accentColor?.customBubbleColors, wallpaper: accentColor?.wallpaper, wallpaperGradientColors: wallpaperGradientColors)
|
||||||
}
|
}
|
||||||
effectiveWallpaper = theme?.chat.defaultWallpaper ?? .builtin(WallpaperSettings())
|
effectiveWallpaper = theme?.chat.defaultWallpaper ?? .builtin(WallpaperSettings())
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user