fix bug where lock event would conflict with menu UI

master
Paul Arguillère 2024-03-28 09:00:07 +01:00
parent 71ff4afb39
commit 041a8ef910
1 changed files with 5 additions and 1 deletions

View File

@ -57,7 +57,7 @@ function writeSettings() {
let inMenu = false;
Bangle.on('touch', function (zone, e) {
if (!inMenu) {
if (!inMenu && e.y > 24) {
if (drawTimeout) clearTimeout(drawTimeout);
E.showMenu(menu);
inMenu = true;
@ -276,6 +276,10 @@ function updateQueueMillis(displaySeconds) {
}
Bangle.on('lock', function (on, reason) {
if (inMenu) { // if already in a menu, nothing to do
return;
}
if (on) { // screen is locked
temp_displaySeconds = false;
updateQueueMillis(false);