mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-02-10 01:56:33 +01:00
Fix cached statuses gone
This commit is contained in:
parent
c4236e6de7
commit
9743da1e9b
1 changed files with 2 additions and 3 deletions
|
@ -198,9 +198,7 @@ function StatusPage({ id }) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// RESET
|
// 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;
|
scrollOffsets.current = null;
|
||||||
cachedStatusesMap.current = {};
|
|
||||||
}, [statuses]);
|
}, [statuses]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
@ -227,9 +225,10 @@ function StatusPage({ id }) {
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
return () => {
|
return () => {
|
||||||
// clear all scrollPositions
|
// RESET
|
||||||
states.scrollPositions = {};
|
states.scrollPositions = {};
|
||||||
states.reloadStatusPage = 0;
|
states.reloadStatusPage = 0;
|
||||||
|
cachedStatusesMap.current = {};
|
||||||
};
|
};
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue