Merge pull request #3644 from thyttan/smpltmr

smpltmr: adapt to new setui
pull/3679/head
Rob Pilling 2024-11-29 21:49:48 +00:00 committed by GitHub
commit 73c32737a9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 9 additions and 5 deletions

View File

@ -7,4 +7,5 @@
0.07: Update clock_info to avoid a redraw
0.08: Timer ClockInfo now updates once a minute
0.09: Timer ClockInfo resets to timer menu when blurred
0.10: Timer ClockInfo now uses +- icons, and changes timer from 'T-5 min' to just '5 min' to aid readability
0.10: Timer ClockInfo now uses +- icons, and changes timer from 'T-5 min' to just '5 min' to aid readability
0.11: Fix to handle updated firmware on fw 2v25 (or cutting edge >2v24.164), btn -> btnRelease. The timer would fire on long press before the watch reset.

View File

@ -173,12 +173,15 @@ function updateLayoutField(layout, field, value) {
Bangle.loadWidgets();
Bangle.drawWidgets();
Bangle.setUI({
let uiOptions = {
mode : "custom",
touch : function(n,e) {onTouch(n,e);},
drag : function(e) {onDrag(e);},
btn : function(n) {onButton();},
});
};
if (parseFloat(process.env.VERSION.replace("v","")) < 224.164) {uiOptions.btn = function(n) {onButton();};}
else {uiOptions.btnRelease = function(n) {onButton();};}
Bangle.setUI(uiOptions);
g.clearRect(Bangle.appRect);
if (timerRunning()) {

View File

@ -2,7 +2,7 @@
"id": "smpltmr",
"name": "Simple Timer",
"shortName": "Simple Timer",
"version": "0.10",
"version": "0.11",
"description": "A very simple app to start a timer.",
"icon": "app.png",
"tags": "tool,alarm,timer,clkinfo",