fix long pages landing

This commit is contained in:
Diogo
2024-11-07 23:00:44 +00:00
parent f167b31e85
commit de1c0f2bf8
+1 -1
View File
@@ -922,7 +922,7 @@ struct ChatView: View {
let index = im.reversedChatItems.firstIndex { $0.id == chatItemId }
if let index {
if let gap = im.gap {
let size = max(0, (apiGap ?? 0) - index)
let size = max(0, (apiGap ?? 0) - index - reversedPage.count)
if size > 0 {
im.gap = ChatGap(index: gap.index, size: size)
} else {