mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 14:20:20 +00:00
[WIP] Serialization
This commit is contained in:
@@ -7,6 +7,8 @@ import SwiftSignalKit
|
||||
import AnimationCache
|
||||
import MultiAnimationRenderer
|
||||
import TelegramNotices
|
||||
import FlatBuffers
|
||||
import FlatSerialization
|
||||
|
||||
public extension EmojiPagerContentComponent {
|
||||
private static func hasPremium(context: AccountContext, chatPeerId: EnginePeer.Id?, premiumIfSavedMessages: Bool) -> Signal<Bool, NoError> {
|
||||
@@ -1366,6 +1368,14 @@ public extension EmojiPagerContentComponent {
|
||||
continue
|
||||
}
|
||||
|
||||
#if DEBUG && false
|
||||
let fbData = item.file.encodeToFlatBuffersData()
|
||||
var byteBuffer = ByteBuffer(data: fbData)
|
||||
let flatBuffersObject: TelegramCore_TelegramMediaFile = try! getCheckedRoot(byteBuffer: &byteBuffer)
|
||||
let fbObject = try! TelegramMediaFile(flatBuffersObject: flatBuffersObject)
|
||||
assert(item.file == fbObject)
|
||||
#endif
|
||||
|
||||
var icon: EmojiPagerContentComponent.Item.Icon = .none
|
||||
if [.reaction(onlyTop: false), .quickReaction].contains(subject), !hasPremium {
|
||||
icon = .locked
|
||||
|
||||
Reference in New Issue
Block a user