Skip to content

Commit badf4b2

Browse files
committed
taglaunch: Do not save images in cache
1 parent 35ca9b0 commit badf4b2

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

apps/taglaunch/app.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ if ("font" in settings){
3131
scaleval = (font.split("x")[1])/20;
3232
}
3333
}
34+
const appimgs = {};
3435

3536
let sort = (a, b) => {
3637
let n=(0|a.sortorder)-(0|b.sortorder);
@@ -113,8 +114,8 @@ let showTagMenu = (tag) => {
113114
g.clearRect((r.x),(r.y),(r.x+r.w-1), (r.y+r.h-1));
114115
g.setFont(font).setFontAlign(-1,0).drawString(app.name,64*scaleval,r.y+(32*scaleval));
115116
if (app.icon) {
116-
if (!app.img) app.img = s.read(app.icon); // load icon if it wasn't loaded
117-
try {g.drawImage(app.img,8*scaleval, r.y+(8*scaleval), {scale: scaleval});} catch(e){}
117+
if (!appimgs[app.id]) appimgs[app.id] = s.read(app.icon); // load icon if it wasn't loaded
118+
try {g.drawImage(appimgs[app.id],8*scaleval, r.y+(8*scaleval), {scale: scaleval});} catch(e){}
118119
}
119120
},
120121
select : i => {

0 commit comments

Comments
 (0)