Watch
1
0
Fork
You've already forked souveraine
0

fix: guard altAction on long-press

GroupButton called it unguarded while releaseAction two lines up was guarded.
altAction is null for every toggle without a menu, so a long-press threw. Only
showed once the toggles that had been filtered out of the panel started
rendering.
This commit is contained in:
Fimeg 2026-07-31 13:38:25 -04:00
commit 189de61cbe

View file

@ -111,8 +111,14 @@ Button {
}
onPressAndHold: () => {
altAction();
root.down = false;
// Guarded like releaseAction above. altAction is null for every
// toggle without a menu (AndroidQuickToggleButton sets it from
// hasMenu), so an unguarded call threw
// "Property 'altAction' ... is not a function" on any long-press
// of one. It only started showing up when the toggles that had
// been silently filtered out of the panel began rendering.
if (root.altAction) root.altAction();
root.down = false;
root.clicked = false;
};
}