mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-08-18 11:30:04 +00:00
28 lines
846 B
Swift
28 lines
846 B
Swift
import Foundation
|
|
|
|
public struct MessageHistoryHole: Equatable, CustomStringConvertible {
|
|
public let stableId: UInt32
|
|
public let maxIndex: MessageIndex
|
|
public let min: MessageId.Id
|
|
let tags: UInt32
|
|
|
|
public init(stableId: UInt32, maxIndex: MessageIndex, min: MessageId.Id, tags: UInt32) {
|
|
self.stableId = stableId
|
|
self.maxIndex = maxIndex
|
|
self.min = min
|
|
self.tags = tags
|
|
}
|
|
|
|
var id: MessageId {
|
|
return maxIndex.id
|
|
}
|
|
|
|
public var description: String {
|
|
return "MessageHistoryHole(peerId: \(self.maxIndex.id.peerId), min: \(self.min), max: \(self.maxIndex.id.id))"
|
|
}
|
|
|
|
public static func ==(lhs: MessageHistoryHole, rhs: MessageHistoryHole) -> Bool {
|
|
return lhs.maxIndex == rhs.maxIndex && lhs.min == rhs.min && lhs.tags == rhs.tags
|
|
}
|
|
}
|