Update payments

This commit is contained in:
Ali
2021-04-09 14:07:34 +04:00
parent 0b9c938e92
commit dc014dead1
7 changed files with 132 additions and 19 deletions

View File

@@ -138,6 +138,11 @@ final class BotCheckoutActionButton: HighlightableButtonNode {
self.progressBackgroundNode.layer.add(basicAnimation, forKey: "progressRotation")
case let .active(title):
if let applePayButton = self.applePayButton {
self.applePayButton = nil
applePayButton.removeFromSuperview()
}
if case .active = previousState {
let makeLayout = TextNode.asyncLayout(self.labelNode)
let (labelLayout, labelApply) = makeLayout(TextNodeLayoutArguments(attributedString: NSAttributedString(string: title, font: titleFont, textColor: self.foregroundColor), backgroundColor: nil, maximumNumberOfLines: 1, truncationType: .end, constrainedSize: validLayout, alignment: .natural, cutout: nil, insets: UIEdgeInsets()))