mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2024-12-17 17:20:21 +01:00
drop after gap items when > optimal size
This commit is contained in:
@@ -925,6 +925,9 @@ struct ChatView: View {
|
||||
let size = max(0, (apiGap ?? 0) - index - reversedPage.count)
|
||||
if size > 0 {
|
||||
im.gap = ChatGap(index: gap.index, size: size)
|
||||
if im.reversedChatItems.count + dedupedreversePage.count - gap.index > idealChatListSize {
|
||||
im.reversedChatItems.removeLast(dedupedreversePage.count)
|
||||
}
|
||||
} else {
|
||||
im.gap = nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user