mirror of
https://github.com/TelegramMessenger/Telegram-iOS.git
synced 2026-07-06 03:33:41 +02:00
Temp fix
This commit is contained in:
parent
e69dbc82bd
commit
c8caa0eb70
2 changed files with 9 additions and 3 deletions
|
|
@ -16,11 +16,11 @@ private let randomBackgroundColors: [Int32] = [0x007aff, 0x00c2ed, 0x29b327, 0xe
|
|||
|
||||
extension TelegramThemeSettings {
|
||||
convenience init(baseTheme: TelegramBaseTheme, accentColor: UIColor, messageColors: (top: UIColor, bottom: UIColor?)?, wallpaper: TelegramWallpaper?) {
|
||||
var messageColorsValues: (Int32, Int32)?
|
||||
var messageColorsValues: (UInt32, UInt32)?
|
||||
if let colors = messageColors {
|
||||
messageColorsValues = (Int32(bitPattern: colors.0.argb), Int32(bitPattern: colors.1?.argb ?? colors.0.argb))
|
||||
messageColorsValues = (UInt32(bitPattern: colors.0.argb), UInt32(bitPattern: colors.1?.argb ?? colors.0.argb))
|
||||
}
|
||||
self.init(baseTheme: baseTheme, accentColor: Int32(bitPattern: accentColor.argb), messageColors: messageColorsValues, wallpaper: wallpaper)
|
||||
self.init(baseTheme: baseTheme, accentColor: UInt32(bitPattern: accentColor.argb), messageColors: messageColorsValues, wallpaper: wallpaper)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -7,6 +7,12 @@ public enum TelegramBaseTheme: Int32 {
|
|||
case tinted
|
||||
}
|
||||
|
||||
public extension UInt32 {
|
||||
init(bitPattern: UInt32) {
|
||||
self = bitPattern
|
||||
}
|
||||
}
|
||||
|
||||
public final class TelegramThemeSettings: PostboxCoding, Equatable {
|
||||
public static func == (lhs: TelegramThemeSettings, rhs: TelegramThemeSettings) -> Bool {
|
||||
if lhs.baseTheme != rhs.baseTheme {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue