systray: fix remove items (#1098)

* systray: fix remove item

* docs: add entry to CHANGELOG.md
This commit is contained in:
Vyacheslav Ananev 2024-05-06 19:05:57 +07:00 committed by GitHub
parent 3dca22deb1
commit d1fde927d2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 0 deletions

View File

@ -6,6 +6,7 @@ All notable changes to eww will be listed here, starting at changes since versio
### Fixes
- Fix and refactor nix flake (By: w-lfchen)
- Fix remove items from systray (By: vnva)
### Features
- Add `:truncate` property to labels, disabled by default (except in cases where truncation would be enabled in version `0.5.0` and before) (By: Rayzeq).

View File

@ -106,6 +106,7 @@ impl notifier_host::Host for Tray {
fn remove_item(&mut self, id: &str) {
if let Some(item) = self.items.get(id) {
self.container.remove(&item.widget);
self.items.remove(id);
} else {
log::warn!("Tried to remove nonexistent item {:?} from systray", id);
}