status-area: Don't add duplicate status item
Some clients seem to have issues with this.
This commit is contained in:
parent
ebe18a17c5
commit
6e99ad42b5
1 changed files with 8 additions and 4 deletions
|
|
@ -37,11 +37,15 @@ impl StatusNotifierWatcher {
|
|||
} else {
|
||||
service.to_string()
|
||||
};
|
||||
Self::status_notifier_item_registered(&ctxt, &service)
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
self.items.push((sender.to_owned(), service));
|
||||
// Ignore duplicate
|
||||
if !self.items.iter().any(|(a, b)| (a, b) == (sender, &service)) {
|
||||
Self::status_notifier_item_registered(&ctxt, &service)
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
self.items.push((sender.to_owned(), service));
|
||||
}
|
||||
}
|
||||
|
||||
fn register_status_notifier_host(&self, _service: &str) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue