forked from Shinonome/dots-hyprland
tray service: revert togglePin() for fewer if cases
This commit is contained in:
@@ -42,16 +42,11 @@ Singleton {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function togglePin(itemId) {
|
function togglePin(itemId) {
|
||||||
if (root.isPinned(itemId)) {
|
var pins = Config.options.tray.pinnedItems;
|
||||||
if (!root.invertPins)
|
if (pins.includes(itemId)) {
|
||||||
unpin(itemId);
|
unpin(itemId)
|
||||||
else
|
|
||||||
pin(itemId);
|
|
||||||
} else {
|
} else {
|
||||||
if (!root.invertPins)
|
pin(itemId)
|
||||||
pin(itemId);
|
|
||||||
else
|
|
||||||
unpin(itemId);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user