mirror of https://github.com/espruino/BangleApps
taglaunch: Fix remove handler
parent
4777d98c10
commit
2024f9267c
|
@ -2,3 +2,4 @@
|
|||
0.02: Use Bangle.showClock for changing to clock (Backport from launch)
|
||||
0.03: Remove app from 'tool' when it has at least one other known tag
|
||||
Add tag 'health' for apps like Heart Rate Monitor
|
||||
0.04: Fix remove handler
|
||||
|
|
|
@ -73,6 +73,12 @@ let tagKeys = Object.keys(tags).filter(tag => tag !== "clock" || settings.showCl
|
|||
if (!settings.fullscreen)
|
||||
Bangle.loadWidgets();
|
||||
|
||||
const unload = () => {
|
||||
// cleanup the timeout to not leave anything behind after being removed from ram
|
||||
if (lockTimeout) clearTimeout(lockTimeout);
|
||||
Bangle.removeListener("lock", lockHandler);
|
||||
};
|
||||
|
||||
let showTagMenu = (tag) => {
|
||||
E.showScroller({
|
||||
h : 64*scaleval, c : appsByTag[tag].length,
|
||||
|
@ -96,7 +102,8 @@ let showTagMenu = (tag) => {
|
|||
load(app.src);
|
||||
}
|
||||
},
|
||||
back : showMainMenu
|
||||
back : showMainMenu,
|
||||
remove: unload
|
||||
});
|
||||
};
|
||||
|
||||
|
@ -118,11 +125,7 @@ let showMainMenu = () => {
|
|||
showTagMenu(tag);
|
||||
},
|
||||
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);
|
||||
}
|
||||
remove : unload
|
||||
});
|
||||
};
|
||||
showMainMenu();
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"id": "taglaunch",
|
||||
"name": "Tag Launcher",
|
||||
"shortName": "Taglauncher",
|
||||
"version": "0.03",
|
||||
"version": "0.04",
|
||||
"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",
|
||||
"icon": "app.png",
|
||||
|
|
Loading…
Reference in New Issue