ha: prevent touch/swipe/drag overlap events after a swipe

master
Rob Pilling 2024-04-22 08:39:18 +01:00
parent cce28d9675
commit 1eae81e7f6
1 changed files with 2 additions and 0 deletions

View File

@ -148,6 +148,8 @@ Bangle.on('touch', (btn, e) => {
Bangle.on("swipe", (lr,ud) => {
if (slider) return; // "disable" swiping on sliders
if (Date.now() - lastTouch < 250) return;
lastTouch = Date.now();
if (lr == -1) {
toLeft();