0.14: Reduce memory usage when running app settings page
parent
22a005203f
commit
d54c0c7dea
|
|
@ -119,7 +119,7 @@
|
|||
{ "id": "setting",
|
||||
"name": "Settings",
|
||||
"icon": "settings.png",
|
||||
"version":"0.13",
|
||||
"version":"0.14",
|
||||
"description": "A menu for setting up Bangle.js",
|
||||
"tags": "tool,system",
|
||||
"storage": [
|
||||
|
|
|
|||
|
|
@ -14,4 +14,5 @@
|
|||
Move LCD Timeout to wakeup menu
|
||||
0.13: Fix memory leak for App settings
|
||||
Make capitalization more consistent
|
||||
Move LCD Brightness menu into more general LCD menu
|
||||
Move LCD Brightness menu into more general LCD menu
|
||||
0.14: Reduce memory usage when running app settings page
|
||||
|
|
|
|||
|
|
@ -325,8 +325,6 @@ function showClockMenu() {
|
|||
return E.showMenu(clockMenu);
|
||||
}
|
||||
|
||||
|
||||
|
||||
function showSetTimeMenu() {
|
||||
d = new Date();
|
||||
const timemenu = {
|
||||
|
|
@ -419,8 +417,8 @@ function showAppSettingsMenu() {
|
|||
'< Back': ()=>showMainMenu(),
|
||||
}
|
||||
const apps = storage.list(/\.info$/)
|
||||
.map(app => storage.readJSON(app, 1))
|
||||
.filter(app => app && app.settings)
|
||||
.map(app => {var a=storage.readJSON(app, 1);return (a&&a.settings)?a:undefined})
|
||||
.filter(app => app) // filter out any undefined apps
|
||||
.sort((a, b) => a.sortorder - b.sortorder)
|
||||
if (apps.length === 0) {
|
||||
appmenu['No app has settings'] = () => { };
|
||||
|
|
|
|||
Loading…
Reference in New Issue