Fix cached statuses gone

pull/47/head
Lim Chee Aun 2023-01-10 20:05:47 +08:00
rodzic c4236e6de7
commit 9743da1e9b
1 zmienionych plików z 2 dodań i 3 usunięć

Wyświetl plik

@ -198,9 +198,7 @@ function StatusPage({ id }) {
}
// RESET
// This will probably fail when user "forward" back to open the Status page again, but gosh, too many use-cases to mimic what the browser does
scrollOffsets.current = null;
cachedStatusesMap.current = {};
}, [statuses]);
useEffect(() => {
@ -227,9 +225,10 @@ function StatusPage({ id }) {
useEffect(() => {
return () => {
// clear all scrollPositions
// RESET
states.scrollPositions = {};
states.reloadStatusPage = 0;
cachedStatusesMap.current = {};
};
}, []);