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) {
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)
}
}