Various improvements

This commit is contained in:
Ali
2023-10-23 17:41:52 +04:00
parent b43fa0ecb5
commit 75ee418716
14 changed files with 228 additions and 40 deletions

View File

@@ -26,6 +26,15 @@ public struct ChatTextInputAttributes {
}
public let originalTextAttributeKey = NSAttributedString.Key(rawValue: "Attribute__OriginalText")
public final class OriginalTextAttribute: NSObject {
public let id: Int
public let string: String
public init(id: Int, string: String) {
self.id = id
self.string = string
}
}
public func stateAttributedStringForText(_ text: NSAttributedString) -> NSAttributedString {
let sourceString = NSMutableAttributedString(attributedString: text)