forked from FOSS/BangleApps
Use Bangle.load and Bangle.showClock
parent
f0a270b1b2
commit
c6e70dbab4
|
@ -14,3 +14,4 @@
|
|||
added timeOut to return to the clock
|
||||
0.11: Cleanup timeout when changing to clock
|
||||
Reset timeout on swipe and drag
|
||||
0.12: Use Bangle.load and Bangle.showClock
|
||||
|
|
|
@ -94,7 +94,7 @@
|
|||
const appId = id * appsN + iconN;
|
||||
if( settings.direct && launchCache.apps[appId])
|
||||
{
|
||||
load(launchCache.apps[appId].src);
|
||||
Bangle.load(launchCache.apps[appId].src);
|
||||
return;
|
||||
}
|
||||
if (appId == selectedItem && launchCache.apps[appId]) {
|
||||
|
@ -102,7 +102,7 @@
|
|||
if (!app.src || s.read(app.src) === undefined) {
|
||||
E.showMessage( /*LANG*/ "App Source\nNot found");
|
||||
} else {
|
||||
load(app.src);
|
||||
Bangle.load(app.src);
|
||||
}
|
||||
}
|
||||
selectedItem = appId;
|
||||
|
@ -186,39 +186,22 @@
|
|||
let i = YtoIdx(e.y);
|
||||
selectItem(i, e);
|
||||
},
|
||||
swipe: (h,_) => { if(settings.swipeExit && h==1) { returnToClock(); } },
|
||||
swipe: (h,_) => { if(settings.swipeExit && h==1) { Bangle.showClock(); } },
|
||||
btn: _=> { if (settings.oneClickExit) Bangle.showClock(); },
|
||||
remove: function() {
|
||||
if (timeout) clearTimeout(timeout);
|
||||
}
|
||||
};
|
||||
|
||||
const returnToClock = function() {
|
||||
Bangle.setUI();
|
||||
delete launchCache;
|
||||
delete launchHash;
|
||||
delete drawItemAuto;
|
||||
delete drawText;
|
||||
delete selectItem;
|
||||
delete onDrag;
|
||||
delete drawItems;
|
||||
delete drawItem;
|
||||
delete returnToClock;
|
||||
delete idxToY;
|
||||
delete YtoIdx;
|
||||
delete settings;
|
||||
if (timeout) clearTimeout(timeout);
|
||||
setTimeout(eval, 0, s.read(".bootcde"));
|
||||
};
|
||||
|
||||
|
||||
if (settings.oneClickExit) mode.btn = returnToClock;
|
||||
|
||||
let timeout;
|
||||
const updateTimeout = function(){
|
||||
if (settings.timeOut!="Off"){
|
||||
let time=parseInt(settings.timeOut); //the "s" will be trimmed by the parseInt
|
||||
if (timeout) clearTimeout(timeout);
|
||||
timeout = setTimeout(returnToClock,time*1000);
|
||||
timeout = setTimeout(returnToClock,time*1000);
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
updateTimeout();
|
||||
|
||||
Bangle.setUI(mode);
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"id": "iconlaunch",
|
||||
"name": "Icon Launcher",
|
||||
"shortName" : "Icon launcher",
|
||||
"version": "0.11",
|
||||
"version": "0.12",
|
||||
"icon": "app.png",
|
||||
"description": "A launcher inspired by smartphones, with an icon-only scrollable menu.",
|
||||
"tags": "tool,system,launcher",
|
||||
|
|
Loading…
Reference in New Issue