Skip to content

Commit 5b83d75

Browse files
committed
E_showPrompt_Q3: allow long press actions
as proposed at espruino/BangleApps#3915 (comment)
1 parent c72410f commit 5b83d75

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

libs/js/banglejs/E_showPrompt_Q3.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@
6464
draw(i); // highlighted button
6565
g.flip(); // write to screen
6666
E.showPrompt(); // remove
67+
if (e.type===2 /*long press*/ && options.buttonsLong && options.buttonsLong[btns[i]]) {
68+
resolve(options.buttonsLong[btns[i]]);
69+
}
6770
resolve(options.buttons[btns[i]]);
6871
}
6972
});
@@ -76,4 +79,4 @@
7679
};
7780
Bangle.setUI(ui);
7881
});
79-
})
82+
})

0 commit comments

Comments
 (0)