From a9fff204779201cc21ec08ce47650a3e55c4c8bd Mon Sep 17 00:00:00 2001 From: Martin Boonk Date: Tue, 25 Jul 2023 20:43:12 +0200 Subject: [PATCH] iconlaunch - Use objects instead of arrays --- apps/iconlaunch/app.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/apps/iconlaunch/app.js b/apps/iconlaunch/app.js index 92676a33a..cb43dd79f 100644 --- a/apps/iconlaunch/app.js +++ b/apps/iconlaunch/app.js @@ -45,18 +45,20 @@ const iconYoffset = Math.floor(whitespace/4)-1; const itemSize = iconSize + whitespace; - launchCache.items = []; + let t = Date.now(); + launchCache.items = {}; for (let c of launchCache.apps){ let i = Math.floor(count/appsN); if (!launchCache.items[i]) - launchCache.items.push([]); - launchCache.items[Math.floor(count/appsN)].push(c); + launchCache.items[i] = {}; + launchCache.items[i].push(count%3); if (c.icon) c.icondata = s.read(c.icon); else c.icondata = ICON_MISSING; count++; } + let drawItem = function(itemI, r) { let x = 0; let apps = launchCache.items[itemI];