Skip to content

Commit a488e7c

Browse files
authored
ensure that when unlocked, we automatically focus the clockinfo by faking a tap on it
1 parent 1d23e36 commit a488e7c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

apps/bigclkinfo/app.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,5 +50,9 @@ let clockInfoMenu = clock_info.addInteractive(clockInfoItems, {
5050
g.setFont(foundFontText.font).setFontAlign(0,1).drawString(foundFontText.text, midx,options.y+165); // draw the text
5151
}
5252
});
53-
53+
Bangle.on("lock", function(locked) {
54+
// ensure that when unlocked, we automatically focus the clockinfo by faking a tap on it
55+
if (!locked && !clockInfoMenu.focus)
56+
Bangle.emit("touch",0,{x:100,y:100});
57+
});
5458
E.prependListener("kill", ()=>{clockInfoMenu.menuA = 0; clockInfoMenu.menuB = 0;}) // reset to initial menu state to prepare for next launch.

0 commit comments

Comments
 (0)