mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2024-12-17 17:20:21 +01:00
fix before cut off when a lot of items come in same page
This commit is contained in:
@@ -926,7 +926,8 @@ struct ChatView: View {
|
||||
case .last, .initial:
|
||||
im.reversedChatItems.append(contentsOf: dedupedreversePage)
|
||||
case .before(_, _):
|
||||
if im.reversedChatItems.count + dedupedreversePage.count > idealChatListSize {
|
||||
if im.reversedChatItems.count + dedupedreversePage.count > idealChatListSize,
|
||||
dedupedreversePage.count <= loadItemsPerPage {
|
||||
if let gap = im.gap {
|
||||
im.gap = ChatGap(index: gap.index, size: gap.size + dedupedreversePage.count)
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user