mirror of https://github.com/espruino/BangleApps
promenu: call `options.remove` when removed
parent
22078e87cc
commit
b2ff2eb47f
|
@ -11,3 +11,4 @@
|
|||
0.07: Fix bug with alarms app (scroller) and correctly show images
|
||||
0.08: Fix bug with modifying menu - allows hadash to save scroll positions
|
||||
0.09: Don't show "..." if a string isn't truncated (i.e. scrolled)
|
||||
0.10: Trigger `remove` callbacks when ending the menu
|
||||
|
|
|
@ -193,9 +193,11 @@ E.showMenu = function (items) {
|
|||
mode: "updown",
|
||||
back: back,
|
||||
remove: function () {
|
||||
var _a;
|
||||
if (nameScroller)
|
||||
clearInterval(nameScroller);
|
||||
Bangle.removeListener("swipe", onSwipe);
|
||||
(_a = options.remove) === null || _a === void 0 ? void 0 : _a.call(options);
|
||||
},
|
||||
}, function (dir) {
|
||||
if (dir)
|
||||
|
|
|
@ -240,6 +240,7 @@ E.showMenu = (items?: Menu): MenuInstance => {
|
|||
remove: () => {
|
||||
if (nameScroller) clearInterval(nameScroller);
|
||||
Bangle.removeListener("swipe", onSwipe);
|
||||
options.remove?.();
|
||||
},
|
||||
} as SetUIArg<"updown">,
|
||||
dir => {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"id": "promenu",
|
||||
"name": "Pro Menu",
|
||||
"version": "0.09",
|
||||
"version": "0.10",
|
||||
"description": "Replace the built in menu function. Supports Bangle.js 1 and Bangle.js 2.",
|
||||
"icon": "icon.png",
|
||||
"type": "bootloader",
|
||||
|
|
Loading…
Reference in New Issue