mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
Various fixes
This commit is contained in:
@@ -167,7 +167,7 @@ final class EntityKeyboardAnimationTopPanelComponent: Component {
|
||||
itemLayer.layerTintColor = component.theme.list.itemAccentColor.cgColor
|
||||
}
|
||||
|
||||
itemLayer.isVisibleForAnimations = true
|
||||
itemLayer.isVisibleForAnimations = itemEnvironment.isContentInFocus
|
||||
}
|
||||
|
||||
if itemEnvironment.isExpanded {
|
||||
@@ -924,11 +924,13 @@ final class EntityKeyboardStaticStickersPanelComponent: Component {
|
||||
|
||||
public final class EntityKeyboardTopPanelItemEnvironment: Equatable {
|
||||
public let isExpanded: Bool
|
||||
public let isContentInFocus: Bool
|
||||
public let isHighlighted: Bool
|
||||
public let highlightedSubgroupId: AnyHashable?
|
||||
|
||||
public init(isExpanded: Bool, isHighlighted: Bool, highlightedSubgroupId: AnyHashable?) {
|
||||
public init(isExpanded: Bool, isContentInFocus: Bool, isHighlighted: Bool, highlightedSubgroupId: AnyHashable?) {
|
||||
self.isExpanded = isExpanded
|
||||
self.isContentInFocus = isContentInFocus
|
||||
self.isHighlighted = isHighlighted
|
||||
self.highlightedSubgroupId = highlightedSubgroupId
|
||||
}
|
||||
@@ -937,6 +939,9 @@ public final class EntityKeyboardTopPanelItemEnvironment: Equatable {
|
||||
if lhs.isExpanded != rhs.isExpanded {
|
||||
return false
|
||||
}
|
||||
if lhs.isContentInFocus != rhs.isContentInFocus {
|
||||
return false
|
||||
}
|
||||
if lhs.isHighlighted != rhs.isHighlighted {
|
||||
return false
|
||||
}
|
||||
@@ -1798,7 +1803,11 @@ public final class EntityKeyboardTopPanelComponent: Component {
|
||||
transition: itemTransition,
|
||||
component: item.content,
|
||||
environment: {
|
||||
EntityKeyboardTopPanelItemEnvironment(isExpanded: itemLayout.isExpanded, isHighlighted: self.activeContentItemId == item.id, highlightedSubgroupId: self.activeContentItemId == item.id ? self.activeSubcontentItemId : nil)
|
||||
EntityKeyboardTopPanelItemEnvironment(
|
||||
isExpanded: itemLayout.isExpanded,
|
||||
isContentInFocus: self.environment?.isContentInFocus ?? false,
|
||||
isHighlighted: self.activeContentItemId == item.id,
|
||||
highlightedSubgroupId: self.activeContentItemId == item.id ? self.activeSubcontentItemId : nil)
|
||||
},
|
||||
containerSize: itemOuterFrame.size
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user