remove watcher for BTN1

pull/2235/head
thyttan 2022-11-06 18:59:16 +01:00
parent e20a47bf35
commit 02b5f3be58
1 changed files with 2 additions and 1 deletions

View File

@ -13,7 +13,7 @@ let settings = Object.assign({
}, require('Storage').readJSON("dtlaunch.json", true) || {});
if( settings.oneClickExit)
setWatch(_=> returnToClock, BTN1);
let buttonWatch = setWatch(_=> returnToClock, BTN1);
let s = require("Storage");
var apps = s.list(/\.info$/).map(app=>{
@ -140,6 +140,7 @@ Bangle.on("touch",touchListenerDt);
const returnToClock = function() {
Bangle.setUI();
clearWatch(buttonWatch);
delete s;
delete a;
delete n;