Skip to content

Commit

Permalink
Fix flash of unscrolled position
Browse files Browse the repository at this point in the history
Due to statuses being memo-ed, need to speed up the scroll position setup
  • Loading branch information
cheeaun committed Jan 6, 2024
1 parent 147a12c commit e44ac16
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pages/status.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ function StatusThread({ id, closeLink = '/', instance: propInstance }) {
};

useEffect(initContext, [id, masto]);
useEffect(() => {
useLayoutEffect(() => {
if (!statuses.length) return;
console.debug('STATUSES', statuses);
const scrollPosition = scrollPositions[id];
Expand Down

0 comments on commit e44ac16

Please sign in to comment.