[WIP] General history loading and topic improvements

This commit is contained in:
Ali
2022-11-09 10:47:14 +04:00
parent 91277cd2b0
commit bc99f54b63
29 changed files with 689 additions and 159 deletions

View File

@@ -129,13 +129,13 @@ func chatHistoryViewForLocation(_ location: ChatHistoryLocationInput, ignoreMess
}
}
let maxIndex = targetIndex + count / 2
let minIndex = targetIndex - count / 2
let maxIndex = targetIndex + 40
let minIndex = targetIndex - 40
if minIndex <= 0 && view.holeEarlier {
fadeIn = true
return .Loading(initialData: combinedInitialData, type: .Generic(type: updateType))
}
if maxIndex >= targetIndex {
if maxIndex >= view.entries.count {
if view.holeLater {
fadeIn = true
return .Loading(initialData: combinedInitialData, type: .Generic(type: updateType))