diff options
| author | Christophe Besson <cbesson@gmail.com> | 2026-08-30 10:51:06 +0200 |
|---|---|---|
| committer | Christophe Besson <cbesson@gmail.com> | 2026-08-30 10:51:06 +0200 |
| commit | f5d311b7a0ac0cf72eda3c07c7b19f5d13d201a0 (patch) | |
| tree | 9f93cfe2637e425505f70bee5a27db71af2839a6 /packages | |
| parent | a2215bb071c4e1ce11c616d26df8fd4e7a8fdf57 (diff) | |
| parent | 397727d2bf3f24c81ddda1e7a9eda197d7ed3b9e (diff) | |
| download | meshbay-f5d311b7a0ac0cf72eda3c07c7b19f5d13d201a0.tar.gz | |
Merge branch 'fix/search-page-refresh-button'
Diffstat (limited to 'packages')
| -rw-r--r-- | packages/meshbay-hub/src/meshbay_hub/static/search-page.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/packages/meshbay-hub/src/meshbay_hub/static/search-page.js b/packages/meshbay-hub/src/meshbay_hub/static/search-page.js index e36532f..fced022 100644 --- a/packages/meshbay-hub/src/meshbay_hub/static/search-page.js +++ b/packages/meshbay-hub/src/meshbay_hub/static/search-page.js @@ -190,6 +190,9 @@ function SearchPage({ token, username, userId, groups, onPlayQueue, userPrefs }) const [indexedGroups, setIndexedGroups] = useState(new Map()); const [progress, setProgress] = useState({ done: 0, total: 0, unreachable: [] }); const [fetching, setFetching] = useState(false); + // Bumped by the Files breadcrumb refresh button — re-runs the all-groups + // index fetch below, the only "cache" this page has. + const [refreshTick, setRefreshTick] = useState(0); const [query, setQuery] = useState(''); const [viewMode, setViewMode] = useState('files'); const [videoEntry, setVideoEntry] = useState(null); @@ -232,7 +235,7 @@ function SearchPage({ token, username, userId, groups, onPlayQueue, userPrefs }) })(); return () => { cancelled = true; }; - }, [groups, token]); + }, [groups, token, refreshTick]); // -- Connection management -- @@ -551,7 +554,8 @@ function SearchPage({ token, username, userId, groups, onPlayQueue, userPrefs }) onPreview=${onPreview} showGroup=${true} readOnly=${true} - getTransport=${getTransport} /> + getTransport=${getTransport} + onRefreshIndex=${() => setRefreshTick((n) => n + 1)} /> `} ${viewMode === 'videos' && hasResults && html` |