fix(sni): delay tray item insertion until proxies are ready

Only add tray widgets after the SNI proxy has finished initializing and the
item has a valid id/category pair.

This also removes invalid items through the host teardown path, refreshes the
tray when item status changes, and avoids calling DBus methods through a null
proxy during early clicks or scroll events.

Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
This commit is contained in:
Austin Horstman
2026-03-08 01:08:39 -06:00
parent e425423648
commit 2a748f1a56
6 changed files with 112 additions and 17 deletions

View File

@@ -19,6 +19,7 @@ class Tray : public AModule {
private:
void onAdd(std::unique_ptr<Item>& item);
void onRemove(std::unique_ptr<Item>& item);
void queueUpdate();
static inline std::size_t nb_hosts_ = 0;
bool show_passive_ = false;