mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 06:35:51 +00:00
UI and theme improvements
This commit is contained in:
@@ -189,10 +189,9 @@ final class WallpaperPatternPanelNode: ASDisplayNode {
|
||||
}
|
||||
}
|
||||
|
||||
var backgroundColors: (UIColor, UIColor?, Int32?)? = nil {
|
||||
var backgroundColors: ([UInt32], Int32?)? = nil {
|
||||
didSet {
|
||||
if oldValue?.0.rgb != self.backgroundColors?.0.rgb || oldValue?.1?.rgb != self.backgroundColors?.1?.rgb
|
||||
|| oldValue?.2 != self.backgroundColors?.2 {
|
||||
if oldValue?.0 != self.backgroundColors?.0 || oldValue?.1 != self.backgroundColors?.1 {
|
||||
self.updateWallpapers()
|
||||
}
|
||||
}
|
||||
@@ -285,7 +284,7 @@ final class WallpaperPatternPanelNode: ASDisplayNode {
|
||||
node.removeFromSupernode()
|
||||
}
|
||||
|
||||
let backgroundColors = self.backgroundColors ?? (UIColor(rgb: 0xd6e2ee), nil, nil)
|
||||
let backgroundColors = self.backgroundColors ?? ([0xd6e2ee], nil)
|
||||
|
||||
var selectedFileId: Int64?
|
||||
if let currentWallpaper = self.currentWallpaper, case let .file(file) = currentWallpaper {
|
||||
@@ -299,7 +298,7 @@ final class WallpaperPatternPanelNode: ASDisplayNode {
|
||||
|
||||
var updatedWallpaper = wallpaper
|
||||
if case let .file(file) = updatedWallpaper {
|
||||
let settings = WallpaperSettings(color: backgroundColors.0.rgb, bottomColor: backgroundColors.1.flatMap { $0.rgb }, intensity: 100, rotation: backgroundColors.2)
|
||||
let settings = WallpaperSettings(colors: backgroundColors.0, intensity: 100, rotation: backgroundColors.1)
|
||||
updatedWallpaper = .file(id: file.id, accessHash: file.accessHash, isCreator: file.isCreator, isDefault: file.isDefault, isPattern: updatedWallpaper.isPattern, isDark: file.isDark, slug: file.slug, file: file.file, settings: settings)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user