Fix peer info header button color

This commit is contained in:
Isaac 2025-02-28 22:03:24 +01:00
parent b51d1a2de8
commit 341b03372b

View File

@ -64,6 +64,12 @@ final class PeerInfoHeaderNavigationButtonContainerNode: SparseNode {
accumulatedRightButtonOffset -= 6.0 accumulatedRightButtonOffset -= 6.0
} }
} }
for (key, button) in self.rightButtonNodes {
if !self.currentRightButtons.contains(where: { $0.key == key }) {
button.updateContentsColor(backgroundColor: self.backgroundContentColor, contentsColor: self.contentsColor, canBeExpanded: canBeExpanded, transition: transition)
transition.updateSublayerTransformOffset(layer: button.layer, offset: CGPoint(x: 0.0, y: 0.0))
}
}
} }
func update(size: CGSize, presentationData: PresentationData, leftButtons: [PeerInfoHeaderNavigationButtonSpec], rightButtons: [PeerInfoHeaderNavigationButtonSpec], expandFraction: CGFloat, shouldAnimateIn: Bool, transition: ContainedViewLayoutTransition) { func update(size: CGSize, presentationData: PresentationData, leftButtons: [PeerInfoHeaderNavigationButtonSpec], rightButtons: [PeerInfoHeaderNavigationButtonSpec], expandFraction: CGFloat, shouldAnimateIn: Bool, transition: ContainedViewLayoutTransition) {