Merge pull request #2628 from Rarder44/master

[app/iconlauncher] fix fullscreen with oneClickExit
pull/2630/head
Gordon Williams 2023-03-03 08:41:15 +00:00 committed by GitHub
commit ba1c109e88
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 24 additions and 7 deletions

View File

@ -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

View File

@ -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();
}
}

View File

@ -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",