mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 06:35:51 +00:00
Update API [skip ci]
This commit is contained in:
@@ -124,7 +124,15 @@ public final class TextAlertContentActionNode: HighlightableButtonNode {
|
||||
case .destructiveAction, .genericAction:
|
||||
break
|
||||
}
|
||||
self.setAttributedTitle(NSAttributedString(string: self.action.title, font: font, textColor: color, paragraphAlignment: .center), for: [])
|
||||
|
||||
let attributedString = NSMutableAttributedString(string: self.action.title, font: font, textColor: color, paragraphAlignment: .center)
|
||||
if let range = attributedString.string.range(of: "⭐️") {
|
||||
attributedString.addAttribute(.attachment, value: UIImage(bundleImageName: "Item List/PremiumIcon")!, range: NSRange(range, in: attributedString.string))
|
||||
attributedString.addAttribute(.foregroundColor, value: color, range: NSRange(range, in: attributedString.string))
|
||||
attributedString.addAttribute(.baselineOffset, value: 1.0, range: NSRange(range, in: attributedString.string))
|
||||
}
|
||||
|
||||
self.setAttributedTitle(attributedString, for: [])
|
||||
self.accessibilityLabel = self.action.title
|
||||
self.accessibilityTraits = [.button]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user