Skip to content

Commit cf7a7bb

Browse files
committed
[qcenter] fix timeout clearing
1 parent ef3bf7b commit cf7a7bb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

apps/qcenter/app.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ let layout = new Layout({
111111
remove: ()=>{
112112
Bangle.removeListener("swipe", onSwipe);
113113
Bangle.removeListener("touch", updateTimeout);
114-
if (timeout) clearTimeout(timeout);
114+
if (timeout) { clearTimeout(timeout); timeout = undefined; }
115115
delete Graphics.prototype.setFont8x12;
116116
}
117117
});
@@ -121,8 +121,8 @@ Bangle.drawWidgets();
121121

122122
let timeout;
123123
const updateTimeout = function(){
124-
if (settings.timeout){
125-
if (timeout) clearTimeout(timeout);
124+
if (settings.timeout){
125+
if (timeout) { clearTimeout(timeout); timeout = undefined; }
126126
timeout = setTimeout(Bangle.showClock,settings.timeout*1000);
127127
}
128128
};

0 commit comments

Comments
 (0)