Hard reset posts on time filter switch
This commit is contained in:
parent
e9195b3f49
commit
7ecf7a9779
|
|
@ -434,6 +434,12 @@ export function usePostsEngine({
|
|||
const map = mapRef.current;
|
||||
replacePoolRef.current = true;
|
||||
pendingFilterRef.current = `${mainFilter}|${subFilter}|${timeHours}`;
|
||||
allPostsRef.current = [];
|
||||
setVisiblePosts([]);
|
||||
syncMarkers([]);
|
||||
if (map && clustersEnabled && heatmapEnabled) {
|
||||
updateClusterAreas(map, []);
|
||||
}
|
||||
if (map) {
|
||||
map.__swForceFetchAt = Date.now();
|
||||
setTimeout(() => {
|
||||
|
|
@ -442,7 +448,7 @@ export function usePostsEngine({
|
|||
} catch {}
|
||||
}, 60);
|
||||
}
|
||||
}, [mainFilter, subFilter, timeHours, mapRef]);
|
||||
}, [mainFilter, subFilter, timeHours, mapRef, syncMarkers, clustersEnabled, heatmapEnabled, updateClusterAreas]);
|
||||
|
||||
const priorityOpts = {
|
||||
maxFullCards: 15,
|
||||
|
|
|
|||
Loading…
Reference in New Issue