Merge pull request #2873 from bobrippling/rep-fixes

rep: interface & recorder fixes
pull/2885/head
Gordon Williams 2023-07-14 08:18:37 +01:00 committed by GitHub
commit 1add0622b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 8 additions and 4 deletions

2
apps/rep/ChangeLog Normal file
View File

@ -0,0 +1,2 @@
0.01: New app!
0.02: Fixed interaction with recorder UI listeners

View File

@ -252,6 +252,7 @@ var _a, _b, _c;
};
var init = function () {
g.clear();
layout_1.setUI();
drawRep_1();
Bangle.drawWidgets();
};

View File

@ -233,7 +233,7 @@ class State {
currentRepIndex() {
const elapsed = this.getElapsedTotal();
let ent;
for(let i = 0; ent = reps[i]; i++)
for(let i = 0; (ent = reps[i]); i++)
if(elapsed < ent.accDur)
return i;
return null;
@ -316,6 +316,7 @@ const buzzNewRep = () => {
const init = () => {
g.clear();
layout.setUI();
drawRep();
Bangle.drawWidgets();

View File

@ -59,8 +59,8 @@ function renderRep(rep) {
}
buttonDelete.appendChild(iconDelete);
buttonDelete.onclick = (e => {
reps = reps.filter(a => a !== alarm);
document.getElementById("events").removeChild(tr);
reps = reps.filter(a => a !== rep);
document.getElementById("repsTable").removeChild(tr);
});
}
tdInfo.appendChild(buttonDelete);

View File

@ -1,7 +1,7 @@
{
"id": "rep",
"name": "Rep",
"version":"0.01",
"version":"0.02",
"description": "Time running reps, using a rep schedule/program uploaded via the app loader",
"icon": "app.png",
"tags": "run,running,fitness,outdoors",