Skip to content

Commit

Permalink
Merge pull request #3682 from bobrippling/feat/promenu-remove
Browse files Browse the repository at this point in the history
promenu: call `options.remove` when removed
  • Loading branch information
bobrippling authored Dec 11, 2024
2 parents 516b74f + 9987a2d commit f964405
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions apps/promenu/ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 2 additions & 0 deletions apps/promenu/bootb2.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions apps/promenu/bootb2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ E.showMenu = (items?: Menu): MenuInstance => {
remove: () => {
if (nameScroller) clearInterval(nameScroller);
Bangle.removeListener("swipe", onSwipe);
options.remove?.();
},
} as SetUIArg<"updown">,
dir => {
Expand Down
2 changes: 1 addition & 1 deletion apps/promenu/metadata.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down

0 comments on commit f964405

Please sign in to comment.