Various fixes

This commit is contained in:
Ilya Laktyushin
2025-01-02 14:57:21 +04:00
parent 3512968e0e
commit d9e35e7882
9 changed files with 61 additions and 20 deletions

View File

@@ -1225,7 +1225,9 @@ public final class ReactionButtonAsyncNode: ContextControllerSourceView {
let tintColor: UIColor
if layout.backgroundLayout.colors.isSelected {
if layout.spec.component.colors.selectedForeground != 0 {
if layout.spec.component.colors.selectedIconTintColor != 0 {
tintColor = UIColor(argb: layout.spec.component.colors.selectedIconTintColor)
} else if layout.spec.component.colors.selectedForeground != 0 {
tintColor = UIColor(argb: layout.spec.component.colors.selectedForeground)
} else {
tintColor = .white
@@ -1352,6 +1354,7 @@ public final class ReactionButtonComponent: Equatable {
public var selectedBackground: UInt32
public var deselectedForeground: UInt32
public var selectedForeground: UInt32
public var selectedIconTintColor: UInt32
public var deselectedStarsBackground: UInt32
public var selectedStarsBackground: UInt32
public var deselectedStarsForeground: UInt32
@@ -1367,6 +1370,7 @@ public final class ReactionButtonComponent: Equatable {
selectedBackground: UInt32,
deselectedForeground: UInt32,
selectedForeground: UInt32,
selectedIconTintColor: UInt32,
deselectedStarsBackground: UInt32,
selectedStarsBackground: UInt32,
deselectedStarsForeground: UInt32,
@@ -1381,6 +1385,7 @@ public final class ReactionButtonComponent: Equatable {
self.selectedBackground = selectedBackground
self.deselectedForeground = deselectedForeground
self.selectedForeground = selectedForeground
self.selectedIconTintColor = selectedIconTintColor
self.deselectedStarsBackground = deselectedStarsBackground
self.selectedStarsBackground = selectedStarsBackground
self.deselectedStarsForeground = deselectedStarsForeground