mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-08-17 11:00:07 +00:00
25 lines
516 B
Swift
25 lines
516 B
Swift
import Foundation
|
|
#if os(macOS)
|
|
import PostboxMac
|
|
#else
|
|
import Postbox
|
|
#endif
|
|
|
|
public class ViewCountMessageAttribute: MessageAttribute {
|
|
let count: Int
|
|
|
|
public var associatedMessageIds: [MessageId] = []
|
|
|
|
init(count: Int) {
|
|
self.count = count
|
|
}
|
|
|
|
required public init(decoder: Decoder) {
|
|
self.count = Int(decoder.decodeInt32ForKey("c"))
|
|
}
|
|
|
|
public func encode(_ encoder: Encoder) {
|
|
encoder.encodeInt32(Int32(self.count), forKey: "c")
|
|
}
|
|
}
|