ctrlpad: disable swipe while active

pull/3383/head
Rob Pilling 2024-04-27 10:11:41 +01:00
parent e7bec7aeb9
commit c9adcf8d79
1 changed files with 13 additions and 0 deletions

View File

@ -258,6 +258,19 @@
ui = undefined;
};
const onSwipe = () => {
switch (state) {
case State.Idle:
case State.IgnoreCurrent:
return;
case State.TopDrag:
case State.Active:
E.stopEventPropagation?.();
}
};
Bangle.prependListener('swipe', onSwipe);
const onDrag = (e => {
const dragDistance = 30;