mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 14:20:20 +00:00
Support updated API
This commit is contained in:
@@ -70,6 +70,21 @@ func updatePeers(transaction: Transaction, accountPeerId: PeerId, peers: Accumul
|
||||
}
|
||||
}
|
||||
}
|
||||
for (_, chat) in peers.chats {
|
||||
switch chat {
|
||||
case let .channel(flags, flags2, _, _, _, _, _, _, _, _, _, _, _, _, storiesMaxId):
|
||||
let isMin = (flags & (1 << 12)) != 0
|
||||
let storiesUnavailable = (flags2 & (1 << 3)) != 0
|
||||
|
||||
if let storiesMaxId = storiesMaxId {
|
||||
transaction.setStoryItemsInexactMaxId(peerId: chat.peerId, id: storiesMaxId)
|
||||
} else if !isMin && storiesUnavailable {
|
||||
transaction.clearStoryItemsInexactMaxId(peerId: chat.peerId)
|
||||
}
|
||||
default:
|
||||
break
|
||||
}
|
||||
}
|
||||
for (_, peer) in peers.peers {
|
||||
parsedPeers.append(peer)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user