From c8caa0eb70a1e0773427415c9e0340ddeb6c3d3e Mon Sep 17 00:00:00 2001 From: Ali <> Date: Fri, 27 Dec 2019 19:47:47 +0400 Subject: [PATCH] Temp fix --- .../Sources/Themes/ThemeAccentColorController.swift | 6 +++--- submodules/SyncCore/Sources/TelegramTheme.swift | 6 ++++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/submodules/SettingsUI/Sources/Themes/ThemeAccentColorController.swift b/submodules/SettingsUI/Sources/Themes/ThemeAccentColorController.swift index 9dd403664b..fb9baedb68 100644 --- a/submodules/SettingsUI/Sources/Themes/ThemeAccentColorController.swift +++ b/submodules/SettingsUI/Sources/Themes/ThemeAccentColorController.swift @@ -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) } } diff --git a/submodules/SyncCore/Sources/TelegramTheme.swift b/submodules/SyncCore/Sources/TelegramTheme.swift index f6a4121213..8245179787 100644 --- a/submodules/SyncCore/Sources/TelegramTheme.swift +++ b/submodules/SyncCore/Sources/TelegramTheme.swift @@ -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 {