messageslist: Fix invalid use of Bangle.setUI

master
Gordon Williams 2023-07-14 13:16:40 +01:00
parent a4632726a8
commit f4740b149b
3 changed files with 5 additions and 2 deletions

View File

@ -1,2 +1,3 @@
0.01: New app!
0.02: Fix music updates while app is already open
0.03: Fix invalid use of Bangle.setUI

View File

@ -86,7 +86,8 @@
const setUI = function(options, cb) {
delete Bangle.uiRemove; // don't clear out things when switching UI within the app
options = Object.assign({remove: () => uiRemove()}, options);
options = Object.assign({mode:"custom", remove: () => uiRemove()}, options);
// If options={} assume we still want `remove` to be called when leaving via fast load (so we must have 'mode:custom')
Bangle.setUI(options, cb);
};
@ -1164,6 +1165,7 @@
// Internal setUI suppresses Bangle.uiRemove between internal screens, so we
// need to call setUI to run uiRemove from previous app when fast-loaded.
// GW: This shouldn't be needed! When fast loading setUI() gets called automatically
Bangle.setUI();
Bangle.loadWidgets();
require("messages").toggleWidget(false);

View File

@ -1,7 +1,7 @@
{
"id": "messagelist",
"name": "Message List",
"version": "0.02",
"version": "0.03",
"description": "Display notifications from iOS and Gadgetbridge/Android as a list",
"icon": "app.png",
"type": "app",