systray: fix remove items (#1098)
* systray: fix remove item * docs: add entry to CHANGELOG.md
This commit is contained in:
parent
3dca22deb1
commit
d1fde927d2
2 changed files with 2 additions and 0 deletions
|
@ -6,6 +6,7 @@ All notable changes to eww will be listed here, starting at changes since versio
|
||||||
|
|
||||||
### Fixes
|
### Fixes
|
||||||
- Fix and refactor nix flake (By: w-lfchen)
|
- Fix and refactor nix flake (By: w-lfchen)
|
||||||
|
- Fix remove items from systray (By: vnva)
|
||||||
|
|
||||||
### Features
|
### 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).
|
- 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).
|
||||||
|
|
|
@ -106,6 +106,7 @@ impl notifier_host::Host for Tray {
|
||||||
fn remove_item(&mut self, id: &str) {
|
fn remove_item(&mut self, id: &str) {
|
||||||
if let Some(item) = self.items.get(id) {
|
if let Some(item) = self.items.get(id) {
|
||||||
self.container.remove(&item.widget);
|
self.container.remove(&item.widget);
|
||||||
|
self.items.remove(id);
|
||||||
} else {
|
} else {
|
||||||
log::warn!("Tried to remove nonexistent item {:?} from systray", id);
|
log::warn!("Tried to remove nonexistent item {:?} from systray", id);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue