Skip to content

Commit

Permalink
feat: rename variable
Browse files Browse the repository at this point in the history
  • Loading branch information
KatoakDR committed Sep 24, 2024
1 parent f80238a commit 6c8f0e6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions electron/renderer/components/game/game-stream.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@ export const GameStream: React.FC<GameStreamProps> = (

const appendGameLogLines = useCallback((newLogLines: Array<GameLogLine>) => {
// Max number of most recent lines to keep.
const scrollbackBuffer = 500;
const scrollbackBufferSize = 500;
setGameLogLines((oldLogLines) => {
// Append new log line to the list.
newLogLines = oldLogLines.concat(newLogLines);
// Trim the back of the list to keep it within the scrollback buffer.
newLogLines = newLogLines.slice(scrollbackBuffer * -1);
newLogLines = newLogLines.slice(scrollbackBufferSize * -1);
return newLogLines;
});
}, []);
Expand Down

0 comments on commit 6c8f0e6

Please sign in to comment.