mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 14:20:20 +00:00
Update themes
This commit is contained in:
@@ -456,6 +456,7 @@ public struct PresentationThemeAccentColor: PostboxCoding, Equatable {
|
||||
} else {
|
||||
self.bubbleColors = nil
|
||||
}
|
||||
self.wallpaper = decoder.decodeObjectForKey("w", decoder: { TelegramWallpaper(decoder: $0) }) as? TelegramWallpaper
|
||||
}
|
||||
|
||||
public func encode(_ encoder: PostboxEncoder) {
|
||||
@@ -477,6 +478,11 @@ public struct PresentationThemeAccentColor: PostboxCoding, Equatable {
|
||||
encoder.encodeNil(forKey: "bt")
|
||||
encoder.encodeNil(forKey: "bb")
|
||||
}
|
||||
if let wallpaper = self.wallpaper {
|
||||
encoder.encodeObject(wallpaper, forKey: "w")
|
||||
} else {
|
||||
encoder.encodeNil(forKey: "w")
|
||||
}
|
||||
}
|
||||
|
||||
public var color: UIColor {
|
||||
@@ -510,6 +516,10 @@ public struct PresentationThemeAccentColor: PostboxCoding, Equatable {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
public func withUpdatedWallpaper(_ wallpaper: TelegramWallpaper?) -> PresentationThemeAccentColor {
|
||||
return PresentationThemeAccentColor(index: self.index, baseColor: self.baseColor, accentColor: self.accentColor, bubbleColors: self.bubbleColors, wallpaper: wallpaper)
|
||||
}
|
||||
}
|
||||
|
||||
public struct PresentationThemeSettings: PreferencesEntry {
|
||||
|
||||
Reference in New Issue
Block a user