mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-24 07:05:35 +00:00
[WIP] Gift resale
This commit is contained in:
@@ -361,14 +361,21 @@ public final class ContextControllerActionsListActionItemNode: HighlightTracking
|
||||
let inputStateText = ChatTextInputStateText(text: self.item.text, attributes: self.item.entities.compactMap { entity -> ChatTextInputStateTextAttribute? in
|
||||
if case let .CustomEmoji(_, fileId) = entity.type {
|
||||
return ChatTextInputStateTextAttribute(type: .customEmoji(stickerPack: nil, fileId: fileId, enableAnimation: true), range: entity.range)
|
||||
} else if case .Bold = entity.type {
|
||||
return ChatTextInputStateTextAttribute(type: .bold, range: entity.range)
|
||||
}
|
||||
return nil
|
||||
})
|
||||
let result = NSMutableAttributedString(attributedString: inputStateText.attributedText())
|
||||
let result = NSMutableAttributedString(attributedString: inputStateText.attributedText(files: self.item.entityFiles))
|
||||
result.addAttributes([
|
||||
.font: titleFont,
|
||||
.foregroundColor: titleColor
|
||||
], range: NSRange(location: 0, length: result.length))
|
||||
for attribute in inputStateText.attributes {
|
||||
if case .bold = attribute.type {
|
||||
result.addAttribute(NSAttributedString.Key.font, value: Font.semibold(15.0), range: NSRange(location: attribute.range.lowerBound, length: attribute.range.count))
|
||||
}
|
||||
}
|
||||
attributedText = result
|
||||
} else {
|
||||
attributedText = parseMarkdownIntoAttributedString(
|
||||
|
||||
Reference in New Issue
Block a user