Show fallback posts when bounds empty

This commit is contained in:
Your Name 2025-12-26 01:40:11 -05:00
parent 68cb21fc23
commit d7bf3e22cb
1 changed files with 5 additions and 5 deletions

View File

@ -537,6 +537,9 @@ export function usePostsEngine({
if (vBounded.length === 0 && viewParams?.center && viewParams?.radiusKm) {
vBounded = filterByRadius(vAll, viewParams.center, viewParams.radiusKm * 1.2);
}
if (vBounded.length === 0) {
vBounded = vAll;
}
let v = vBounded;
if (v.length > MAX_VISIBLE_POSTS) {
const center = map?.getCenter?.();
@ -723,15 +726,12 @@ export function usePostsEngine({
}
}
const delay = initialLoadRef.current ? 0 : 2400;
initialLoadRef.current = false;
if (moveDebounceRef.current) {
clearTimeout(moveDebounceRef.current);
moveDebounceRef.current = null;
}
moveDebounceRef.current = setTimeout(() => {
if (!cancelled) load();
}, delay);
initialLoadRef.current = false;
load();
return () => {
cancelled = true;
if (moveDebounceRef.current) {