mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-07-31 15:37:01 +00:00

git-subtree-dir: submodules/TelegramCore git-subtree-mainline: 971273e8f8f49a47f14b251d2f35e3445a61fc3f git-subtree-split: 9561227540acef69894e6546395ab223a6233600
25 lines
548 B
Swift
25 lines
548 B
Swift
import Foundation
|
|
#if os(macOS)
|
|
import PostboxMac
|
|
#else
|
|
import Postbox
|
|
#endif
|
|
|
|
public class ViewCountMessageAttribute: MessageAttribute {
|
|
public let count: Int
|
|
|
|
public var associatedMessageIds: [MessageId] = []
|
|
|
|
init(count: Int) {
|
|
self.count = count
|
|
}
|
|
|
|
required public init(decoder: PostboxDecoder) {
|
|
self.count = Int(decoder.decodeInt32ForKey("c", orElse: 0))
|
|
}
|
|
|
|
public func encode(_ encoder: PostboxEncoder) {
|
|
encoder.encodeInt32(Int32(self.count), forKey: "c")
|
|
}
|
|
}
|