mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-08-18 11:30:04 +00:00
21 lines
531 B
Swift
21 lines
531 B
Swift
import Foundation
|
|
|
|
public struct GroupFeedReadState: Equatable {
|
|
public let maxReadIndex: MessageIndex
|
|
|
|
public init(maxReadIndex: MessageIndex) {
|
|
self.maxReadIndex = maxReadIndex
|
|
}
|
|
|
|
public static func ==(lhs: GroupFeedReadState, rhs: GroupFeedReadState) -> Bool {
|
|
if lhs.maxReadIndex != rhs.maxReadIndex {
|
|
return false
|
|
}
|
|
return true
|
|
}
|
|
|
|
func isIncomingMessageIndexRead(_ index: MessageIndex) -> Bool {
|
|
return self.maxReadIndex >= index
|
|
}
|
|
}
|