@@ -35,8 +35,8 @@ private struct ThemeSettingsThemeEntry: Comparable, Identifiable {
3535 let strings : PresentationStrings
3636 let wallpaper : TelegramWallpaper ?
3737
38- var stableId : Int {
39- return index
38+ var stableId : String {
39+ return self . chatTheme ? . id ?? " \( self . index) "
4040 }
4141
4242 static func == ( lhs: ThemeSettingsThemeEntry , rhs: ThemeSettingsThemeEntry ) -> Bool {
@@ -524,11 +524,13 @@ private final class ThemeSettingsThemeItemIconNode : ListViewItemNode {
524524 if let theme = item. chatTheme, case let . gift( _, themeSettings) = theme {
525525 if item. nightMode {
526526 if let theme = themeSettings. first ( where: { $0. baseTheme == . night || $0. baseTheme == . tinted } ) {
527- bubbleColor = UIColor ( rgb: UInt32 ( bitPattern: theme. accentColor) )
527+ let color = theme. wallpaper? . settings? . colors. first ?? theme. accentColor
528+ bubbleColor = UIColor ( rgb: UInt32 ( bitPattern: color) )
528529 }
529530 } else {
530531 if let theme = themeSettings. first ( where: { $0. baseTheme == . classic || $0. baseTheme == . day } ) {
531- bubbleColor = UIColor ( rgb: UInt32 ( bitPattern: theme. accentColor) )
532+ let color = theme. wallpaper? . settings? . colors. first ?? theme. accentColor
533+ bubbleColor = UIColor ( rgb: UInt32 ( bitPattern: color) )
532534 }
533535 }
534536 }
@@ -964,7 +966,6 @@ private class ChatThemeScreenNode: ViewControllerTracingNode, ASScrollViewDelega
964966 self . cancelButtonNode. buttonNode. addTarget ( self , action: #selector( self . cancelButtonPressed) , forControlEvents: . touchUpInside)
965967 self . doneButton. pressed = { [ weak self] in
966968 if let strongSelf = self {
967- strongSelf. doneButton. isUserInteractionEnabled = false
968969 if strongSelf. doneButton. font == . bold {
969970 strongSelf. complete ( )
970971 } else {
@@ -1349,6 +1350,7 @@ private class ChatThemeScreenNode: ViewControllerTracingNode, ASScrollViewDelega
13491350
13501351 func complete( ) {
13511352 let proceed = {
1353+ self . doneButton. isUserInteractionEnabled = false
13521354 self . completion ? ( self . selectedTheme)
13531355 }
13541356 if case let . gift( gift, _) = self . selectedTheme, case let . unique( uniqueGift) = gift, let themePeerId = uniqueGift. themePeerId {
0 commit comments