add global search

This commit is contained in:
naielv
2025-10-02 22:45:41 +02:00
parent f46ec17c03
commit 617711fb1a
6 changed files with 517 additions and 4 deletions

View File

@@ -62,11 +62,25 @@ function updateConnectionStatus(peerCount) {
window.peerRetryCount = (window.peerRetryCount + 1) % 3;
if (window.peerRetryCount === 0) {
gun.opt({ peers: RELAYS });
// Enhanced peer connection retry
setTimeout(() => {
gun.opt({ peers: RELAYS });
}, 1000);
setTimeout(() => {
gun.opt({ peers: RELAYS });
}, 3000);
}
AtLeastThreePeers = false;
} else {
ConnectionStarted = true;
AtLeastThreePeers = true;
// When we have good connectivity, force a data refresh
if (typeof refreshAllData === 'function') {
setTimeout(refreshAllData, 1000);
}
}
}