mirror of
https://github.com/JakeStanger/system-tray.git
synced 2026-07-11 05:15:55 +01:00
[PR #17] [MERGED] client.rs: remove items from 'items' variable when receiving remove e… #20
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
JakeStanger/system-tray#20
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/JakeStanger/system-tray/pull/17
Author: @Levizor
Created: 2/5/2025
Status: ✅ Merged
Merged: 2/5/2025
Merged by: @JakeStanger
Base:
master← Head:items-remove-fix📝 Commits (1)
3e33b42client.rs: remove items from 'items' variable when receiving remove event📊 Changes
1 file changed (+13 additions, -2 deletions)
View changed files
📝
src/client.rs(+13 -2)📄 Description
Client contains items field which stores all the tray items in a HashMap.
Upon receiving a new item client adds it to the mentioned map, so I assume that this map should be synchronized with the real state of the tray. However, when we receive a remove update, the item isn't cleaned from the map, which I find strange. I also don't see updates supplied to this map, so maybe it should be as well implemented.
So my suggestions is to remove items when we receive respective update. If you open and close an application that adds items to a tray now, it will be duplicated over and over, which is clearly not intended.
This problem was mentioned in this issue.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.