tray service: revert togglePin() for fewer if cases

This commit is contained in:
end-4
2026-03-19 18:28:08 +01:00
parent fd2d69e407
commit 0362b21f5a
@@ -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);
} }
} }