Skip to content

Commit

Permalink
remove some comments
Browse files Browse the repository at this point in the history
  • Loading branch information
pablonyx committed Sep 9, 2024
1 parent eddf8c8 commit de63174
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions web/src/app/chat/ChatPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -540,10 +540,6 @@ export function ChatPage({
currentMessageMap(completeMessageDetail)
);

// if (visibleRange.get(loadedIdSessionRef.current)==undefined){
// initializeVisibleRange(true);
// }

const [submittedMessage, setSubmittedMessage] = useState("");

const [chatState, setChatState] = useState<Map<number | null, ChatState>>(
Expand Down Expand Up @@ -1551,8 +1547,7 @@ export function ChatPage({
debounceNumber,
});

// Virutalization + Scrolling related effects and functions

// Virtualization + Scrolling related effects and functions
const scrollInitialized = useRef(false);
interface VisibleRange {
start: number;
Expand Down Expand Up @@ -1597,13 +1592,7 @@ export function ChatPage({
currentMessageMap(completeMessageDetail)
);

if (
!scrollInitialized.current &&
upToDatemessageHistory.length > 0
// &&
// (!visibleRange.get(currentSessionId()) ||
// visibleRange.get(currentSessionId())?.end == 0)
) {
if (!scrollInitialized.current && upToDatemessageHistory.length > 0) {
const newEnd = Math.max(upToDatemessageHistory.length, 40);
const newStart = Math.max(0, newEnd - 20);
const newMostVisibleMessageId =
Expand Down

0 comments on commit de63174

Please sign in to comment.