mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 22:55:00 +00:00
Refactor SyncCore
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
import Foundation
|
||||
#if os(macOS)
|
||||
import PostboxMac
|
||||
#else
|
||||
import Postbox
|
||||
#endif
|
||||
|
||||
public class PeerGroupMessageStateVersionAttribute: MessageAttribute {
|
||||
public let stateIndex: Int32
|
||||
|
||||
public init(stateIndex: Int32) {
|
||||
self.stateIndex = stateIndex
|
||||
}
|
||||
|
||||
required public init(decoder: PostboxDecoder) {
|
||||
self.stateIndex = decoder.decodeInt32ForKey("p", orElse: 0)
|
||||
}
|
||||
|
||||
public func encode(_ encoder: PostboxEncoder) {
|
||||
encoder.encodeInt32(self.stateIndex, forKey: "p")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user