diff --git a/pkg/interface/src/views/apps/chat/components/lib/ChatWindow.tsx b/pkg/interface/src/views/apps/chat/components/lib/ChatWindow.tsx index 4724a94bf..f166ede6a 100644 --- a/pkg/interface/src/views/apps/chat/components/lib/ChatWindow.tsx +++ b/pkg/interface/src/views/apps/chat/components/lib/ChatWindow.tsx @@ -20,6 +20,7 @@ import { BacklogElement } from "./backlog-element"; const INITIAL_LOAD = 20; const DEFAULT_BACKLOG_SIZE = 100; const IDLE_THRESHOLD = 64; +const MAX_BACKLOG_SIZE = 1000; type ChatWindowProps = RouteComponentProps<{ ship: Patp; @@ -188,8 +189,11 @@ export default class ChatWindow extends Component { this.setState({ fetchPending: false }); }); diff --git a/pkg/interface/src/views/components/VirtualScroller.tsx b/pkg/interface/src/views/components/VirtualScroller.tsx index c253a8b81..08da02ff5 100644 --- a/pkg/interface/src/views/components/VirtualScroller.tsx +++ b/pkg/interface/src/views/components/VirtualScroller.tsx @@ -149,13 +149,13 @@ export default class VirtualScroller extends PureComponent { startgap -= this.heightOf(index); }); - + visibleItems = new Map([...visibleItems].reverse()); endBuffer = new Map([...endBuffer].reverse()); const firstVisibleKey = Array.from(visibleItems.keys())[0] ?? this.estimateIndexFromScrollTop(scrollTop); @@ -214,7 +214,7 @@ export default class VirtualScroller extends PureComponent