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