mirror of
https://github.com/marcoallegretti/WEFT_OS.git
synced 2026-03-27 01:13:09 +00:00
fix(shell): clear stale taskbar entries on WebSocket reconnect
When weft-appd restarts, session IDs reset to 0. Without clearing, RUNNING_APPS repopulation after reconnect would coexist with stale entries from the previous session. Removing all weft-taskbar-app elements on the open event ensures the taskbar reflects only the current appd session registry.
This commit is contained in:
parent
5e7675c043
commit
65a10723b3
1 changed files with 1 additions and 0 deletions
|
|
@ -256,6 +256,7 @@
|
||||||
|
|
||||||
ws.addEventListener('open', function () {
|
ws.addEventListener('open', function () {
|
||||||
wsReconnectDelay = 1000;
|
wsReconnectDelay = 1000;
|
||||||
|
document.querySelectorAll('weft-taskbar-app').forEach(function (el) { el.remove(); });
|
||||||
ws.send(JSON.stringify({ type: 'QUERY_RUNNING' }));
|
ws.send(JSON.stringify({ type: 'QUERY_RUNNING' }));
|
||||||
ws.send(JSON.stringify({ type: 'QUERY_INSTALLED_APPS' }));
|
ws.send(JSON.stringify({ type: 'QUERY_INSTALLED_APPS' }));
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue