diff --git a/TelegramUI/ChatHistoryGridNode.swift b/TelegramUI/ChatHistoryGridNode.swift index 52c3c70de1..7bc43cec66 100644 --- a/TelegramUI/ChatHistoryGridNode.swift +++ b/TelegramUI/ChatHistoryGridNode.swift @@ -326,10 +326,10 @@ public final class ChatHistoryGridNode: GridNode, ChatHistoryNode { if let strongSelf = self, let historyView = strongSelf.historyView, let top = visibleItems.top, let bottom = visibleItems.bottom, let visibleTop = visibleItems.topVisible, let visibleBottom = visibleItems.bottomVisible { if top.0 < 5 && historyView.originalView.laterId != nil { let lastEntry = historyView.filteredEntries[historyView.filteredEntries.count - 1 - visibleTop.0] - strongSelf._chatHistoryLocation.set(ChatHistoryLocation.Navigation(index: .message(lastEntry.index), anchorIndex: .message(lastEntry.index), count: 200)) + strongSelf._chatHistoryLocation.set(ChatHistoryLocation.Navigation(index: .message(lastEntry.index), anchorIndex: .message(lastEntry.index), count: 100)) } else if bottom.0 >= historyView.filteredEntries.count - 5 && historyView.originalView.earlierId != nil { let firstEntry = historyView.filteredEntries[historyView.filteredEntries.count - 1 - visibleBottom.0] - strongSelf._chatHistoryLocation.set(ChatHistoryLocation.Navigation(index: .message(firstEntry.index), anchorIndex: .message(firstEntry.index), count: 200)) + strongSelf._chatHistoryLocation.set(ChatHistoryLocation.Navigation(index: .message(firstEntry.index), anchorIndex: .message(firstEntry.index), count: 100)) } } } diff --git a/TelegramUI/ChatHistoryListNode.swift b/TelegramUI/ChatHistoryListNode.swift index 466fddba51..f8f848aa74 100644 --- a/TelegramUI/ChatHistoryListNode.swift +++ b/TelegramUI/ChatHistoryListNode.swift @@ -5,7 +5,7 @@ import Display import AsyncDisplayKit import TelegramCore -private let historyMessageCount: Int = 200 +private let historyMessageCount: Int = 100 public enum ChatHistoryListMode: Equatable { case bubbles