Skip to content

Commit

Permalink
fixing warnings in latest PRs
Browse files Browse the repository at this point in the history
  • Loading branch information
gfwilliams committed Jul 12, 2023
1 parent e6443ba commit e408fb9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
18 changes: 11 additions & 7 deletions apps/flashcards/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,15 @@ function handleDrag(event) {
}
}

// Ensure pressing the button goes to the launcher (by making this seem like a clock?)
Bangle.setUI({mode:"clock"/*, remove:function() {
// Code to enable fast load. NOTE: this doesn't work on this app because all
// functions and vars are declared global: https://www.espruino.com/Bangle.js+Fast+Load
if (drawTimeout) clearTimeout(drawTimeout);
drawTimeout = undefined;
Bangle.removeListener("touch", handleTouch);
if (settings.swipeGesture) { Bangle.removeListener("drag", handleDrag);} else { Bangle.removeListener("stroke", handleStroke); }
}*/});

// initialize
cardLayout.update();
Expand All @@ -174,10 +183,5 @@ if (settings.swipeGesture) { Bangle.on("drag", handleDrag); } else { Bangle.on("
g.clear();
draw();

// cleanup
Bangle.setUI({mode:"clock", remove:function() {
if (drawTimeout) clearTimeout(drawTimeout);
drawTimeout = undefined;
Bangle.removeListener("touch", handleTouch);
if (settings.swipeGesture) { Bangle.removeListener("drag", handleDrag);} else { Bangle.removeListener("stroke", handleStroke); }
}});


2 changes: 1 addition & 1 deletion apps/rep/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ var _a, _b, _c;
State.prototype.currentRepIndex = function () {
var elapsed = this.getElapsedTotal();
var ent;
for (var i = 0; ent = reps_1[i]; i++)
for (var i = 0; (ent = reps_1[i]); i++)
if (elapsed < ent.accDur)
return i;
return null;
Expand Down

0 comments on commit e408fb9

Please sign in to comment.