taglaunch: Backport PR 2316 for launch
parent
e8163a6f14
commit
03f40ffca1
|
|
@ -1 +1,2 @@
|
||||||
0.01: New App!
|
0.01: New App!
|
||||||
|
0.02: Use Bangle.showClock for changing to clock (Backport from launch)
|
||||||
|
|
|
||||||
|
|
@ -69,16 +69,6 @@ let tagKeys = Object.keys(tags).filter(tag => tag !== "clock" || settings.showCl
|
||||||
if (!settings.fullscreen)
|
if (!settings.fullscreen)
|
||||||
Bangle.loadWidgets();
|
Bangle.loadWidgets();
|
||||||
|
|
||||||
let returnToClock = function() {
|
|
||||||
// unload everything manually
|
|
||||||
// ... or we could just call `load();` but it will be slower
|
|
||||||
Bangle.setUI(); // remove scroller's handling
|
|
||||||
if (lockTimeout) clearTimeout(lockTimeout);
|
|
||||||
Bangle.removeListener("lock", lockHandler);
|
|
||||||
// now load the default clock - just call .bootcde as this has the code already
|
|
||||||
setTimeout(eval,0,s.read(".bootcde"));
|
|
||||||
};
|
|
||||||
|
|
||||||
let showTagMenu = (tag) => {
|
let showTagMenu = (tag) => {
|
||||||
E.showScroller({
|
E.showScroller({
|
||||||
h : 64*scaleval, c : appsByTag[tag].length,
|
h : 64*scaleval, c : appsByTag[tag].length,
|
||||||
|
|
@ -121,7 +111,12 @@ let showMainMenu = () => {
|
||||||
let tag = tagKeys[i];
|
let tag = tagKeys[i];
|
||||||
showTagMenu(tag);
|
showTagMenu(tag);
|
||||||
},
|
},
|
||||||
back : returnToClock // button press or tap in top left calls returnToClock now
|
back : Bangle.showClock, // button press or tap in top left shows clock now
|
||||||
|
remove : () => {
|
||||||
|
// cleanup the timeout to not leave anything behind after being removed from ram
|
||||||
|
if (lockTimeout) clearTimeout(lockTimeout);
|
||||||
|
Bangle.removeListener("lock", lockHandler);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
showMainMenu();
|
showMainMenu();
|
||||||
|
|
@ -134,7 +129,7 @@ let lockHandler = function(locked) {
|
||||||
if (lockTimeout) clearTimeout(lockTimeout);
|
if (lockTimeout) clearTimeout(lockTimeout);
|
||||||
lockTimeout = undefined;
|
lockTimeout = undefined;
|
||||||
if (locked) {
|
if (locked) {
|
||||||
lockTimeout = setTimeout(returnToClock, 10000);
|
lockTimeout = setTimeout(Bangle.showClock, 10000);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
Bangle.on("lock", lockHandler);
|
Bangle.on("lock", lockHandler);
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
"id": "taglaunch",
|
"id": "taglaunch",
|
||||||
"name": "Tag Launcher",
|
"name": "Tag Launcher",
|
||||||
"shortName": "Taglauncher",
|
"shortName": "Taglauncher",
|
||||||
"version": "0.01",
|
"version": "0.02",
|
||||||
"description": "Launcher that puts all applications into submenus based on their tag. With many applications installed this can result in a faster application selection than the linear access of the default launcher.",
|
"description": "Launcher that puts all applications into submenus based on their tag. With many applications installed this can result in a faster application selection than the linear access of the default launcher.",
|
||||||
"readme": "README.md",
|
"readme": "README.md",
|
||||||
"icon": "app.png",
|
"icon": "app.png",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue