Fix several bugs that could lead to reconnect-looping

Fix misinterpretation of EvenHub event type 5.
Notification modals stacked, in a way that's O(n) in device resource memory; replace with a queue.
This commit is contained in:
James Babcock committed 2026-10-05 01:36:40 -07:00
1 parent e5303e7b3e
commit 38da8e6168
15 files changed
+396 -52

No files matched your search

+13
View File
@@ -198,6 +198,19 @@ export class LayerStack {
return true;
}
/**
* Remove one stacked layer wherever it sits, leaving the layers above it in
* place (e.g. a notification modal that closes under a menu opened over it).
* Returns false if the layer isn't stacked (the base layer can never be removed).
*/
remove(layer: Layer): boolean {
const index = this.layers.indexOf(layer);
if (index <= 0) return false;
this.layers.splice(index, 1);
notifyRemoved(layer);
return true;
}
isAtBase(): boolean {
return this.layers.length === 1;
}