mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
Fix sticker checks color
This commit is contained in:
@@ -676,15 +676,19 @@ public func serviceMessageColorComponents(theme: PresentationTheme, wallpaper: T
|
||||
return serviceMessageColorComponents(chatTheme: theme.chat, wallpaper: wallpaper)
|
||||
}
|
||||
|
||||
public func serviceMessageColorComponents(chatTheme: PresentationThemeChat, wallpaper: TelegramWallpaper) -> PresentationThemeServiceMessageColorComponents {
|
||||
public func serviceMessageColorHasDefaultWallpaper(_ wallpaper: TelegramWallpaper) -> Bool {
|
||||
switch wallpaper {
|
||||
case .color(0xffffff):
|
||||
return chatTheme.serviceMessage.components.withDefaultWallpaper
|
||||
return true
|
||||
default:
|
||||
return chatTheme.serviceMessage.components.withCustomWallpaper
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
public func serviceMessageColorComponents(chatTheme: PresentationThemeChat, wallpaper: TelegramWallpaper) -> PresentationThemeServiceMessageColorComponents {
|
||||
return serviceMessageColorHasDefaultWallpaper(wallpaper) ? chatTheme.serviceMessage.components.withDefaultWallpaper : chatTheme.serviceMessage.components.withCustomWallpaper
|
||||
}
|
||||
|
||||
public final class PresentationThemeServiceMessageColor {
|
||||
public let withDefaultWallpaper: PresentationThemeServiceMessageColorComponents
|
||||
public let withCustomWallpaper: PresentationThemeServiceMessageColorComponents
|
||||
|
||||
Reference in New Issue
Block a user