Fix Tray: prevent icon duplication#731
Conversation
|
thanks for the contribution @clotodex are you using tray apps lately ?? |
Ops, sorry. |
MalpenZibo
left a comment
There was a problem hiding this comment.
Can you try this other solution? I suspect that we're moving the bug instead of resolving it.
| ) { | ||
| let service = if service.starts_with('/') { | ||
| format!("{sender}{service}") | ||
| } else { | ||
| service.to_string() | ||
| }; |
There was a problem hiding this comment.
Let's add this check
| ) { | |
| if self.items.iter().any(|(s, _)| s == &sender) { | |
| return; | |
| } | |
| let service = if service.starts_with('/') { | |
| format!("{sender}{service}") | |
| } else { | |
| service.to_string() | |
| }; |
| if self.items.iter().any(|(_, s)| s == &service) { | ||
| return; | ||
| } |
There was a problem hiding this comment.
Let's remove this check
| sender.into_inner(), | ||
| &emitter, | ||
| ) | ||
| .register_status_notifier_item_manual(name_str, sender.into_inner(), &emitter) |
There was a problem hiding this comment.
Instead of this change, can you try modifying the check in the register_status_notifier_item_manual?
Thank you, this also work, |
Hi,
this PR fixes my issue: #593
feel free to ask some question about the issue,
I've tested this fix with various tray icons on my system and everything works.