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:
parent
1c90d7f76a
commit
189de61cbe
1 changed files with 8 additions and 2 deletions
|
|
@ -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;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue