mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-08-31 18:02:20 +00:00
Holes: fix aroundId fill when requested id is not found
This commit is contained in:
parent
f765c27531
commit
1b3b5aad52
@ -307,8 +307,8 @@ func fetchMessageHistoryHole(accountPeerId: PeerId, source: FetchMessageHistoryH
|
||||
let ids = messages.map({ $0.id!.id })
|
||||
let messageRange = ids.min()! ... ids.max()!
|
||||
switch direction {
|
||||
case .aroundId:
|
||||
filledRange = messageRange
|
||||
case let .aroundId(aroundId):
|
||||
filledRange = min(aroundId.id, messageRange.lowerBound) ... max(aroundId.id, messageRange.lowerBound)
|
||||
case let .range(start, end):
|
||||
if start.id <= end.id {
|
||||
let minBound = start.id
|
||||
|
Loading…
x
Reference in New Issue
Block a user