Fix flash of unscrolled position

Due to statuses being memo-ed, need to speed up the scroll position setup
This commit is contained in:
Lim Chee Aun 2024-01-06 19:15:48 +08:00
parent 147a12cbcb
commit e44ac16396

View file

@ -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];