Skip to content

Commit 07ce498

Browse files
committed
ptlaunch: Add widgets to app (work around E.showMenu(back) bug with no widgets in Espruino 2v27)
1 parent 8442f27 commit 07ce498

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

apps/ptlaunch/ChangeLog

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,5 @@
99
0.15: Update to support clocks in custom setUI mode
1010
0.16: Fix issue adding new patterns (fix #3858)
1111
Display message if tapping manage when there are no patterns
12-
Speed improvements
12+
Speed improvements
13+
Add widgets to app (work around E.showMenu(back) bug with no widgets in Espruino 2v27)

apps/ptlaunch/app.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,8 @@ var recognizeAndDrawPattern = () => {
124124
}
125125
log("Pattern is finished.");
126126
isFinished = true;
127+
g.clear();
128+
require("widget_utils").show();
127129
Bangle.setUI();
128130
resolve(pattern.join(""));
129131
};
@@ -165,6 +167,7 @@ var recognizeAndDrawPattern = () => {
165167
positions = [];
166168
}
167169
};
170+
require("widget_utils").hide();
168171
g.clear();
169172
drawCirclesWithPattern([]);
170173
Bangle.setUI({mode:"custom", drag:dragHandler, btn :finishHandler});
@@ -471,4 +474,6 @@ var log = (message) => {
471474
// run main function
472475
//////
473476

477+
Bangle.loadWidgets();
478+
Bangle.drawWidgets();
474479
showMainMenu();

0 commit comments

Comments
 (0)