mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
Theme fixes
This commit is contained in:
@@ -42,7 +42,7 @@ extension TelegramWallpaper: Codable {
|
||||
let optionKeys = ["motion", "blur"]
|
||||
|
||||
if value.count == 6, let color = UIColor(hexString: value) {
|
||||
self = .color(Int32(bitPattern: color.rgb))
|
||||
self = .color(color.argb)
|
||||
} else {
|
||||
let components = value.components(separatedBy: " ")
|
||||
var blur = false
|
||||
@@ -63,11 +63,11 @@ extension TelegramWallpaper: Codable {
|
||||
}
|
||||
}
|
||||
|
||||
self = .gradient(Int32(bitPattern: topColor.rgb), Int32(bitPattern: bottomColor.rgb), WallpaperSettings(blur: blur, motion: motion, rotation: rotation))
|
||||
self = .gradient(topColor.argb, bottomColor.argb, WallpaperSettings(blur: blur, motion: motion, rotation: rotation))
|
||||
} else {
|
||||
var slug: String?
|
||||
var color: Int32?
|
||||
var bottomColor: Int32?
|
||||
var color: UInt32?
|
||||
var bottomColor: UInt32?
|
||||
var intensity: Int32?
|
||||
var rotation: Int32?
|
||||
|
||||
@@ -82,9 +82,9 @@ extension TelegramWallpaper: Codable {
|
||||
}
|
||||
if component.count == 6, let value = UIColor(hexString: component) {
|
||||
if color == nil {
|
||||
color = Int32(bitPattern: value.rgb)
|
||||
color = value.argb
|
||||
} else if bottomColor == nil {
|
||||
bottomColor = Int32(bitPattern: value.rgb)
|
||||
bottomColor = value.argb
|
||||
}
|
||||
} else if component.count <= 3, let value = Int32(component) {
|
||||
if intensity == nil {
|
||||
|
||||
Reference in New Issue
Block a user