mirror of
https://github.com/TelegramMessenger/Telegram-iOS.git
synced 2026-07-06 03:33:41 +02:00
Emoji in chat folders
This commit is contained in:
parent
1d28e11879
commit
4bed1703a2
59 changed files with 962 additions and 389 deletions
|
|
@ -402,6 +402,7 @@ public final class ChatTextInputTextCustomEmojiAttribute: NSObject, Codable {
|
|||
case file
|
||||
case topicId
|
||||
case topicInfo
|
||||
case enableAnimation
|
||||
}
|
||||
|
||||
public enum Custom: Codable {
|
||||
|
|
@ -417,12 +418,14 @@ public final class ChatTextInputTextCustomEmojiAttribute: NSObject, Codable {
|
|||
public let fileId: Int64
|
||||
public let file: TelegramMediaFile?
|
||||
public let custom: Custom?
|
||||
public let enableAnimation: Bool
|
||||
|
||||
public init(interactivelySelectedFromPackId: ItemCollectionId?, fileId: Int64, file: TelegramMediaFile?, custom: Custom? = nil) {
|
||||
public init(interactivelySelectedFromPackId: ItemCollectionId?, fileId: Int64, file: TelegramMediaFile?, custom: Custom? = nil, enableAnimation: Bool = true) {
|
||||
self.interactivelySelectedFromPackId = interactivelySelectedFromPackId
|
||||
self.fileId = fileId
|
||||
self.file = file
|
||||
self.custom = custom
|
||||
self.enableAnimation = enableAnimation
|
||||
|
||||
super.init()
|
||||
}
|
||||
|
|
@ -433,6 +436,7 @@ public final class ChatTextInputTextCustomEmojiAttribute: NSObject, Codable {
|
|||
self.fileId = try container.decode(Int64.self, forKey: .fileId)
|
||||
self.file = try container.decodeIfPresent(TelegramMediaFile.self, forKey: .file)
|
||||
self.custom = nil
|
||||
self.enableAnimation = try container.decodeIfPresent(Bool.self, forKey: .enableAnimation) ?? true
|
||||
}
|
||||
|
||||
public func encode(to encoder: Encoder) throws {
|
||||
|
|
@ -440,6 +444,7 @@ public final class ChatTextInputTextCustomEmojiAttribute: NSObject, Codable {
|
|||
try container.encodeIfPresent(self.interactivelySelectedFromPackId, forKey: .interactivelySelectedFromPackId)
|
||||
try container.encode(self.fileId, forKey: .fileId)
|
||||
try container.encodeIfPresent(self.file, forKey: .file)
|
||||
try container.encode(self.enableAnimation, forKey: .enableAnimation)
|
||||
}
|
||||
|
||||
override public func isEqual(_ object: Any?) -> Bool {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue