forked from Shinonome/dots-hyprland
right sidebar: fix unused quick toggles being movable
This commit is contained in:
+1
@@ -153,6 +153,7 @@ GroupButton {
|
|||||||
const toggleList = Config.options.sidebar.quickToggles.android.toggles;
|
const toggleList = Config.options.sidebar.quickToggles.android.toggles;
|
||||||
const buttonType = root.buttonData.type;
|
const buttonType = root.buttonData.type;
|
||||||
const targetIndex = index + offset;
|
const targetIndex = index + offset;
|
||||||
|
if (!toggleList.find(toggle => toggle.type === buttonType)) return;
|
||||||
if (targetIndex < 0 || targetIndex >= toggleList.length) return;
|
if (targetIndex < 0 || targetIndex >= toggleList.length) return;
|
||||||
const temp = toggleList[index];
|
const temp = toggleList[index];
|
||||||
toggleList[index] = toggleList[targetIndex];
|
toggleList[index] = toggleList[targetIndex];
|
||||||
|
|||||||
Reference in New Issue
Block a user