From 4795ccfd427e56ce30fb58ad6233d39c6f8047ba Mon Sep 17 00:00:00 2001 From: jl Date: Mon, 11 May 2020 09:03:46 +0200 Subject: [PATCH] fix: reduce memory usage, by suggestions of @gfwilliams --- apps/files/files.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/files/files.js b/apps/files/files.js index 1861575ee..9f9bf3dfa 100644 --- a/apps/files/files.js +++ b/apps/files/files.js @@ -207,6 +207,7 @@ function showSortAppsManually() { } function setSortorder(app, val) { + app = store.readJSON(app.id + '.info', 1); app.sortorder = val; store.writeJSON(app.id + '.info', app); } @@ -215,7 +216,7 @@ function getAppsList() { return store.list('.info').map((a)=> { let app = store.readJSON(a, 1) || {}; if (app.type !== 'widget') { - return app; + return {id: app.id, name: app.name, sortorder: app.sortorder}; } }).filter((a) => a).sort(sortHelper()); }