mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
Serialization update
This commit is contained in:
@@ -336,7 +336,7 @@ public final class ChatEntityKeyboardInputNode: ChatInputNode {
|
||||
continue
|
||||
}
|
||||
|
||||
availableGifSearchEmojies.append(EntityKeyboardComponent.GifSearchEmoji(emoji: reaction, file: file, title: title))
|
||||
availableGifSearchEmojies.append(EntityKeyboardComponent.GifSearchEmoji(emoji: reaction, file: file._parse(), title: title))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -649,7 +649,7 @@ public final class ChatEntityKeyboardInputNode: ChatInputNode {
|
||||
}
|
||||
}
|
||||
})
|
||||
} else if let file = item.itemFile {
|
||||
} else if let file = item.itemFile?._parse() {
|
||||
var text = "."
|
||||
var emojiAttribute: ChatTextInputTextCustomEmojiAttribute?
|
||||
loop: for attribute in file.attributes {
|
||||
@@ -970,11 +970,11 @@ public final class ChatEntityKeyboardInputNode: ChatInputNode {
|
||||
if itemFile.isPremiumEmoji && !hasPremium {
|
||||
continue
|
||||
}
|
||||
let animationData = EntityKeyboardAnimationData(file: itemFile)
|
||||
let animationData = EntityKeyboardAnimationData(file: TelegramMediaFile.Accessor(itemFile))
|
||||
let item = EmojiPagerContentComponent.Item(
|
||||
animationData: animationData,
|
||||
content: .animation(animationData),
|
||||
itemFile: itemFile,
|
||||
itemFile: TelegramMediaFile.Accessor(itemFile),
|
||||
subgroupId: nil,
|
||||
icon: .none,
|
||||
tintMode: animationData.isTemplate ? .primary : .none
|
||||
@@ -1086,11 +1086,11 @@ public final class ChatEntityKeyboardInputNode: ChatInputNode {
|
||||
continue
|
||||
}
|
||||
existingIds.insert(itemFile.fileId)
|
||||
let animationData = EntityKeyboardAnimationData(file: itemFile)
|
||||
let animationData = EntityKeyboardAnimationData(file: TelegramMediaFile.Accessor(itemFile))
|
||||
let item = EmojiPagerContentComponent.Item(
|
||||
animationData: animationData,
|
||||
content: .animation(animationData),
|
||||
itemFile: itemFile,
|
||||
itemFile: TelegramMediaFile.Accessor(itemFile),
|
||||
subgroupId: nil,
|
||||
icon: .none,
|
||||
tintMode: animationData.isTemplate ? .primary : .none
|
||||
@@ -1177,7 +1177,7 @@ public final class ChatEntityKeyboardInputNode: ChatInputNode {
|
||||
guard let interaction else {
|
||||
return
|
||||
}
|
||||
guard let file = item.itemFile else {
|
||||
guard let file = item.itemFile?._parse() else {
|
||||
if case .icon(.add) = item.content {
|
||||
interaction.openStickerEditor()
|
||||
}
|
||||
@@ -1433,11 +1433,12 @@ public final class ChatEntityKeyboardInputNode: ChatInputNode {
|
||||
continue
|
||||
}
|
||||
existingIds.insert(itemFile.fileId)
|
||||
let animationData = EntityKeyboardAnimationData(file: itemFile)
|
||||
let animationData = EntityKeyboardAnimationData(file: TelegramMediaFile.Accessor(itemFile))
|
||||
let item = EmojiPagerContentComponent.Item(
|
||||
animationData: animationData,
|
||||
content: .animation(animationData),
|
||||
itemFile: itemFile, subgroupId: nil,
|
||||
itemFile: TelegramMediaFile.Accessor(itemFile),
|
||||
subgroupId: nil,
|
||||
icon: itemFile.isPremiumSticker ? .premium : .none,
|
||||
tintMode: animationData.isTemplate ? .primary : .none
|
||||
)
|
||||
@@ -2316,10 +2317,10 @@ public final class EntityInputView: UIInputView, AttachmentTextInputPanelInputVi
|
||||
|
||||
if groupId == AnyHashable("featuredTop") {
|
||||
} else {
|
||||
if let file = item.itemFile {
|
||||
if let file = item.itemFile?._parse() {
|
||||
var text = "."
|
||||
var emojiAttribute: ChatTextInputTextCustomEmojiAttribute?
|
||||
loop: for attribute in file.attributes {
|
||||
loop: for attribute in file.attributes {
|
||||
switch attribute {
|
||||
case let .CustomEmoji(_, _, displayText, _):
|
||||
text = displayText
|
||||
|
||||
@@ -568,7 +568,7 @@ final class StickerPaneSearchContentNode: ASDisplayNode, PaneSearchContentNode {
|
||||
func itemAt(point: CGPoint) -> (ASDisplayNode, Any)? {
|
||||
if !self.trendingPane.isHidden {
|
||||
if let (itemNode, item) = self.trendingPane.itemAt(point: self.view.convert(point, to: self.trendingPane.view)) {
|
||||
return (itemNode, StickerPreviewPeekItem.pack(item.file))
|
||||
return (itemNode, StickerPreviewPeekItem.pack(item.file._parse()))
|
||||
}
|
||||
} else {
|
||||
if let itemNode = self.gridNode.itemNodeAtPoint(self.view.convert(point, to: self.gridNode.view)) {
|
||||
@@ -576,7 +576,7 @@ final class StickerPaneSearchContentNode: ASDisplayNode, PaneSearchContentNode {
|
||||
return (itemNode, StickerPreviewPeekItem.found(stickerItem))
|
||||
} else if let itemNode = itemNode as? StickerPaneSearchGlobalItemNode {
|
||||
if let (node, item) = itemNode.itemAt(point: self.view.convert(point, to: itemNode.view)) {
|
||||
return (node, StickerPreviewPeekItem.pack(item.file))
|
||||
return (node, StickerPreviewPeekItem.pack(item.file._parse()))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user