mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-09-01 18:33:10 +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 ids = messages.map({ $0.id!.id })
|
||||||
let messageRange = ids.min()! ... ids.max()!
|
let messageRange = ids.min()! ... ids.max()!
|
||||||
switch direction {
|
switch direction {
|
||||||
case .aroundId:
|
case let .aroundId(aroundId):
|
||||||
filledRange = messageRange
|
filledRange = min(aroundId.id, messageRange.lowerBound) ... max(aroundId.id, messageRange.lowerBound)
|
||||||
case let .range(start, end):
|
case let .range(start, end):
|
||||||
if start.id <= end.id {
|
if start.id <= end.id {
|
||||||
let minBound = start.id
|
let minBound = start.id
|
||||||
|
Loading…
x
Reference in New Issue
Block a user