diff --git a/submodules/WebUI/Sources/WebAppController.swift b/submodules/WebUI/Sources/WebAppController.swift index ac7d8f9b5a..4319ea2e02 100644 --- a/submodules/WebUI/Sources/WebAppController.swift +++ b/submodules/WebUI/Sources/WebAppController.swift @@ -53,9 +53,10 @@ public class WebAppCancelButtonNode: ASDisplayNode { private let strings: PresentationStrings public func updateColor(_ color: UIColor?, transition: ContainedViewLayoutTransition) { + let previousColor = self.color self.color = color - if case let .animated(duration, curve) = transition { + if case let .animated(duration, curve) = transition, previousColor != color { if let snapshotView = self.view.snapshotContentTree() { snapshotView.frame = self.bounds self.view.addSubview(snapshotView)