Fix a number of tag loading glitches

This commit is contained in:
Isaac
2024-01-29 23:56:04 +01:00
parent e1e1abf4b1
commit 4ffc6367bb
6 changed files with 72 additions and 5 deletions

View File

@@ -950,7 +950,15 @@ func fetchMessageHistoryHole(accountPeerId: PeerId, source: FetchMessageHistoryH
case let .aroundId(aroundId):
filledRange = min(aroundId.id, messageRange.lowerBound) ... max(aroundId.id, messageRange.upperBound)
strictFilledIndices = IndexSet(integersIn: Int(min(aroundId.id, messageRange.lowerBound)) ... Int(max(aroundId.id, messageRange.upperBound)))
var shouldFillAround = false
if peerInput.requestThreadId(accountPeerId: accountPeerId) != nil {
shouldFillAround = true
}
if case .customTag = space {
shouldFillAround = true
}
if shouldFillAround {
if ids.count <= count / 2 - 1 {
filledRange = minMaxRange
}