[WIP] Emoji statuses

This commit is contained in:
Ali
2022-08-05 23:16:30 +04:00
parent 551674a744
commit 04ea87c1e3
20 changed files with 1377 additions and 116 deletions

View File

@@ -256,17 +256,20 @@ final class EntityKeyboardIconTopPanelComponent: Component {
let icon: Icon
let theme: PresentationTheme
let useAccentColor: Bool
let title: String
let pressed: () -> Void
init(
icon: Icon,
theme: PresentationTheme,
useAccentColor: Bool,
title: String,
pressed: @escaping () -> Void
) {
self.icon = icon
self.theme = theme
self.useAccentColor = useAccentColor
self.title = title
self.pressed = pressed
}
@@ -278,6 +281,9 @@ final class EntityKeyboardIconTopPanelComponent: Component {
if lhs.theme !== rhs.theme {
return false
}
if lhs.useAccentColor != rhs.useAccentColor {
return false
}
if lhs.title != rhs.title {
return false
}
@@ -352,7 +358,16 @@ final class EntityKeyboardIconTopPanelComponent: Component {
self.component = component
let color = itemEnvironment.isHighlighted ? component.theme.chat.inputMediaPanel.panelHighlightedIconColor : component.theme.chat.inputMediaPanel.panelIconColor
let color: UIColor
if itemEnvironment.isHighlighted {
if component.useAccentColor {
color = component.theme.list.itemAccentColor
} else {
color = component.theme.chat.inputMediaPanel.panelHighlightedIconColor
}
} else {
color = component.theme.chat.inputMediaPanel.panelIconColor
}
if self.iconView.tintColor != color {
if !transition.animation.isImmediate {