mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Temp fix
This commit is contained in:
parent
e69dbc82bd
commit
c8caa0eb70
@ -16,11 +16,11 @@ private let randomBackgroundColors: [Int32] = [0x007aff, 0x00c2ed, 0x29b327, 0xe
|
|||||||
|
|
||||||
extension TelegramThemeSettings {
|
extension TelegramThemeSettings {
|
||||||
convenience init(baseTheme: TelegramBaseTheme, accentColor: UIColor, messageColors: (top: UIColor, bottom: UIColor?)?, wallpaper: TelegramWallpaper?) {
|
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 {
|
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
|
case tinted
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public extension UInt32 {
|
||||||
|
init(bitPattern: UInt32) {
|
||||||
|
self = bitPattern
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public final class TelegramThemeSettings: PostboxCoding, Equatable {
|
public final class TelegramThemeSettings: PostboxCoding, Equatable {
|
||||||
public static func == (lhs: TelegramThemeSettings, rhs: TelegramThemeSettings) -> Bool {
|
public static func == (lhs: TelegramThemeSettings, rhs: TelegramThemeSettings) -> Bool {
|
||||||
if lhs.baseTheme != rhs.baseTheme {
|
if lhs.baseTheme != rhs.baseTheme {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user