Refactoring

This commit is contained in:
Ali
2021-08-03 12:23:13 +02:00
parent 1a0dc56953
commit 7e6eb2b3bd
46 changed files with 702 additions and 470 deletions

View File

@@ -1,6 +1,6 @@
import Foundation
public struct MessageId: Hashable, Comparable, CustomStringConvertible, PostboxCoding {
public struct MessageId: Hashable, Comparable, CustomStringConvertible, PostboxCoding, Codable {
public typealias Namespace = Int32
public typealias Id = Int32
@@ -94,7 +94,7 @@ public struct MessageId: Hashable, Comparable, CustomStringConvertible, PostboxC
}
}
public struct MessageIndex: Comparable, Hashable {
public struct MessageIndex: Codable, Comparable, Hashable {
public let id: MessageId
public let timestamp: Int32
@@ -514,7 +514,7 @@ public struct MessageForwardInfo: Equatable {
}
}
public protocol MessageAttribute: class, PostboxCoding {
public protocol MessageAttribute: AnyObject, PostboxCoding {
var associatedPeerIds: [PeerId] { get }
var associatedMessageIds: [MessageId] { get }
var automaticTimestampBasedAttribute: (UInt16, Int32)? { get }