diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2023-05-31 22:29:12 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2023-05-31 22:29:12 +0200 |
| commit | 1bab32969f6e7bf538a923cf176d2ce2b9c3a092 (patch) | |
| tree | f708c0fa855bb915018ec2f384f07a964cda9e28 /web | |
| parent | 039881fdbfa69a33b27f84e8db3671fe8cfac5e6 (diff) | |
| download | WRMS-1bab32969f6e7bf538a923cf176d2ce2b9c3a092.tar.gz WRMS-1bab32969f6e7bf538a923cf176d2ce2b9c3a092.zip | |
tag all events with a monotonic id in order to ignore outdated ones
Diffstat (limited to 'web')
| -rw-r--r-- | web/client.html | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/web/client.html b/web/client.html index 8e0fa04..41e224f 100644 --- a/web/client.html +++ b/web/client.html @@ -291,7 +291,6 @@ const form = new FormData(document.getElementById("searchForm")); const urlParams = new URLSearchParams(form); - urlParams.append("id", searchId); new HttpClient().get("/search?" + urlParams.toString(), console.log); return false; } @@ -320,12 +319,12 @@ searchingIndicator.style.display = "none"; let searchResultsOverlay = document.getElementById("searchResultsOverlay"); searchResultsOverlay['aria-busy'] = false; - searchId += 1; } function handleSearch(id, songs) { // Ignore stale search results if (id < searchId) { return; } + if (id > searchId) { searchId = id; } let searchResultsOverlay = document.getElementById("searchResultsOverlay"); let searchResults = document.getElementById("searchResults"); |
