mirror of https://github.com/espruino/BangleApps
Merge pull request #2628 from Rarder44/master
[app/iconlauncher] fix fullscreen with oneClickExitpull/2630/head
commit
ba1c109e88
|
@ -21,3 +21,4 @@
|
|||
0.15: Ensure that we hide widgets if in fullscreen mode
|
||||
(So that widgets are still hidden if launcher is fast-loaded)
|
||||
0.16: Use firmware provided E.showScroller method
|
||||
0.17: fix fullscreen with oneClickExit
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
timeOut:"Off"
|
||||
}, s.readJSON("iconlaunch.json", true) || {});
|
||||
|
||||
|
||||
if (!settings.fullscreen) {
|
||||
Bangle.loadWidgets();
|
||||
Bangle.drawWidgets();
|
||||
|
@ -103,15 +104,12 @@
|
|||
};
|
||||
const itemsN = Math.ceil(launchCache.apps.length / appsN);
|
||||
|
||||
let back = ()=>{};
|
||||
if (settings.oneClickExit) back = Bangle.showClock;
|
||||
|
||||
let idWatch = null;
|
||||
let options = {
|
||||
h: itemSize,
|
||||
c: itemsN,
|
||||
draw: drawItem,
|
||||
select: selectItem,
|
||||
back: back,
|
||||
remove: function() {
|
||||
if (timeout) clearTimeout(timeout);
|
||||
Bangle.removeListener("drag", updateTimeout);
|
||||
|
@ -120,8 +118,26 @@
|
|||
if (settings.fullscreen) { // for fast-load, if we hid widgets then we should show them again
|
||||
require("widget_utils").show();
|
||||
}
|
||||
}
|
||||
if(idWatch) clearWatch(idWatch);
|
||||
},
|
||||
btn:Bangle.showClock
|
||||
};
|
||||
|
||||
//work both the fullscreen and the oneClickExit
|
||||
if( settings.fullscreen && settings.oneClickExit)
|
||||
{
|
||||
idWatch=setWatch(function(e) {
|
||||
Bangle.showClock();
|
||||
}, BTN, {repeat:false, edge:'rising' });
|
||||
|
||||
}
|
||||
else if( settings.oneClickExit )
|
||||
{
|
||||
options.back=Bangle.showClock;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
let scroller = E.showScroller(options);
|
||||
|
||||
|
@ -141,4 +157,4 @@
|
|||
Bangle.on("touch", updateTimeout);
|
||||
|
||||
updateTimeout();
|
||||
}
|
||||
}
|
|
@ -2,7 +2,7 @@
|
|||
"id": "iconlaunch",
|
||||
"name": "Icon Launcher",
|
||||
"shortName" : "Icon launcher",
|
||||
"version": "0.16",
|
||||
"version": "0.17",
|
||||
"icon": "app.png",
|
||||
"description": "A launcher inspired by smartphones, with an icon-only scrollable menu.",
|
||||
"tags": "tool,system,launcher",
|
||||
|
|
Loading…
Reference in New Issue