Skip to content

Commit 04e76db

Browse files
authored
Remove unwanted setInterval for steps update
1 parent 7932107 commit 04e76db

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

apps/clock_info/lib.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,8 @@ exports.load = function() {
8787
text : v, v : v, min : 0, max : stepGoal,
8888
img : atob("GBiBAAcAAA+AAA/AAA/AAB/AAB/gAA/g4A/h8A/j8A/D8A/D+AfH+AAH8AHn8APj8APj8AHj4AHg4AADAAAHwAAHwAAHgAAHgAADAA==")
8989
};},
90-
show : function() { stepUpdateInterval=setInterval(stepUpdateHandler,150000); stepUpdateHandler(); },
91-
hide : function() { clearInterval(stepUpdateInterval); },
92-
run:stepUpdateHandler
90+
show : function() { Bangle.on("step", stepUpdateHandler); stepUpdateHandler(); },
91+
hide : function() { Bangle.removeListener("step", stepUpdateHandler); },
9392
},
9493
{ name : "HRM",
9594
hasRange : true,

0 commit comments

Comments
 (0)