banglerun fix timer

Missing modulo 60 caused the minutes not to reset when hitting 60
pull/486/head
Jasper Orschulko 2020-06-04 22:35:50 +02:00
parent 53061f27d3
commit 9da68b6efd
No known key found for this signature in database
GPG Key ID: 6D53814EAC345EF4
3 changed files with 3 additions and 2 deletions

View File

@ -1433,7 +1433,7 @@
"name": "BangleRun",
"shortName": "BangleRun",
"icon": "banglerun.png",
"version": "0.01",
"version": "0.02",
"description": "An app for running sessions.",
"tags": "run,running,fitness,outdoors",
"allow_emulator": false,

View File

@ -1 +1,2 @@
0.01: First release
0.02: Bugfix time: Reset minutes to 0 when hitting 60

View File

@ -184,7 +184,7 @@ function formatDistance(m) {
function formatTime(s) {
const hrs = Math.floor(s / 3600);
const min = Math.floor(s / 60);
const min = Math.floor(s / 60) % 60;
const sec = Math.floor(s % 60);
return (hrs ? hrs + ':' : '') + ('0' + min).substr(-2) + `:` + ('0' + sec).substr(-2);
}