mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 22:55:00 +00:00
preload history small optimization
This commit is contained in:
@@ -247,12 +247,19 @@ private final class AdditionalPreloadPeerIdsContext {
|
||||
}
|
||||
}
|
||||
|
||||
public struct ChatHistoryPreloadItem : Equatable {
|
||||
public struct ChatHistoryPreloadItem : Equatable, Hashable {
|
||||
public let index: ChatListIndex
|
||||
public let threadId: Int64?
|
||||
public let isMuted: Bool
|
||||
public let hasUnread: Bool
|
||||
|
||||
public func hash(into hasher: inout Hasher) {
|
||||
hasher.combine(index.hashValue)
|
||||
if let threadId = threadId {
|
||||
hasher.combine(threadId)
|
||||
}
|
||||
}
|
||||
|
||||
public init(index: ChatListIndex, threadId: Int64?, isMuted: Bool, hasUnread: Bool) {
|
||||
self.index = index
|
||||
self.threadId = threadId
|
||||
|
||||
Reference in New Issue
Block a user