diff options
Diffstat (limited to 'packages/meshbay-hub/src/meshbay_hub/static/group-page.js')
| -rw-r--r-- | packages/meshbay-hub/src/meshbay_hub/static/group-page.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/packages/meshbay-hub/src/meshbay_hub/static/group-page.js b/packages/meshbay-hub/src/meshbay_hub/static/group-page.js index 5972e000..728ffc37 100644 --- a/packages/meshbay-hub/src/meshbay_hub/static/group-page.js +++ b/packages/meshbay-hub/src/meshbay_hub/static/group-page.js @@ -789,6 +789,18 @@ function GroupPage({ groupId, group, token, username, userId, userPrefs, // it; nothing in between should disturb a working connection. }, [groupId, Boolean(token), retryKey]); + // A group that could not be reached is tried again when the device joins + // another network: from the Wi-Fi to mobile data, or back, is what decides + // whether the node can be reached, and in the Android application there is + // no reload to do it. Not while a code, a passphrase or a device link is + // asked for: those wait for the person, not for a network. + useEffect(() => { + if (status !== 'error' || needsPass || needsCode || needsDevice) return undefined; + const T = window.MeshBayTransport; + if (!T || !T.onNetworkChange) return undefined; + return T.onNetworkChange(() => setRetryKey((k) => k + 1)); + }, [status, needsPass, needsCode, needsDevice]); + const downloadFileForModal = useCallback(async (entry) => { // The video/preview modals' own download button — the table's row and // toolbar actions call the same shared helper from files-app.js, since |