Various fixes

This commit is contained in:
Ilya Laktyushin
2024-03-04 17:52:17 +04:00
parent 79ac0a6c5f
commit be9463e80b
7 changed files with 47 additions and 13 deletions

View File

@@ -17,6 +17,12 @@ public final class AudioTranscriptionButtonComponent: Component {
} else {
return false
}
case let .custom(lhsBackgroundColor, lhsForegroundColor):
if case let .custom(rhsBackgroundColor, rhsForegroundColor) = rhs {
return lhsBackgroundColor == rhsBackgroundColor && lhsForegroundColor == rhsForegroundColor
} else {
return false
}
case let .freeform(lhsFreeform, lhsForeground):
if case let .freeform(rhsFreeform, rhsForeground) = rhs, lhsFreeform == rhsFreeform, lhsForeground == rhsForeground {
return true
@@ -27,6 +33,7 @@ public final class AudioTranscriptionButtonComponent: Component {
}
case bubble(PresentationThemePartedColors)
case custom(UIColor, UIColor)
case freeform((UIColor, Bool), UIColor)
}
@@ -101,6 +108,9 @@ public final class AudioTranscriptionButtonComponent: Component {
case let .bubble(theme):
foregroundColor = theme.bubble.withWallpaper.reactionActiveBackground
backgroundColor = theme.bubble.withWallpaper.reactionInactiveBackground
case let .custom(backgroundColorValue, foregroundColorValue):
foregroundColor = foregroundColorValue
backgroundColor = backgroundColorValue
case let .freeform(colorAndBlur, color):
foregroundColor = color
backgroundColor = .clear