mirror of
https://github.com/end-4/dots-hyprland.git
synced 2026-06-05 14:59:27 -05:00
tray service: revert togglePin() for fewer if cases
This commit is contained in:
@@ -42,16 +42,11 @@ Singleton {
|
||||
}
|
||||
|
||||
function togglePin(itemId) {
|
||||
if (root.isPinned(itemId)) {
|
||||
if (!root.invertPins)
|
||||
unpin(itemId);
|
||||
else
|
||||
pin(itemId);
|
||||
var pins = Config.options.tray.pinnedItems;
|
||||
if (pins.includes(itemId)) {
|
||||
unpin(itemId)
|
||||
} else {
|
||||
if (!root.invertPins)
|
||||
pin(itemId);
|
||||
else
|
||||
unpin(itemId);
|
||||
pin(itemId)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user