diff --git a/apps/cutelauncher/app.js b/apps/cutelauncher/app.js index a258f18a1..e8bdd9656 100644 --- a/apps/cutelauncher/app.js +++ b/apps/cutelauncher/app.js @@ -1,16 +1,17 @@ { + let s = require('Storage'); let settings = Object.assign( { showClocks: false, scrollbar: true }, - require('Storage').readJSON('cutelauncher.setting.json', true) || {} + s.readJSON('cutelauncher.setting.json', true) || {} ); - let s = require('Storage'); // Borrowed caching from Icon Launcher, code by halemmerich. let launchCache = s.readJSON('launch.cache.json', true) || {}; - let launchHash = require('Storage').hash(/\.info/); + let launchHash = s.hash(/\.info/) + JSON.stringify(settings).length; + console.log(launchHash); if (launchCache.hash != launchHash) { launchCache = { hash: launchHash, @@ -90,9 +91,6 @@ const lineLeft = 9; const lineRight = overlayWidth - 9; - // // Draw outlines (increased from ±2 to ±3) - // overlay.setColor(g.theme.bg); - // Draw inner lines (increased from ±1 to ±2) overlay.setColor(g.theme.bg2); overlay.fillRect(lineLeft - 2, lineY1 - 1, lineRight + 2, lineY1 + 1); @@ -176,9 +174,11 @@ // Remove lock handler Bangle.removeListener('lock'); // Remove drag handler - Bangle.removeListener('drag', updateOnDrag); - // Clear the scroll overlay - Bangle.setLCDOverlay(); + if (settings.scrollbar) { + Bangle.removeListener('drag', updateOnDrag); + // Clear the scroll overlay + Bangle.setLCDOverlay(); + } } }); diff --git a/apps/cutelauncher/metadata.json b/apps/cutelauncher/metadata.json index df630c5c9..cc950bb31 100644 --- a/apps/cutelauncher/metadata.json +++ b/apps/cutelauncher/metadata.json @@ -2,7 +2,7 @@ "id": "cutelauncher", "name": "Cute Launcher", "shortName": "Cute Launcher", - "version": "0.23", + "version": "0.24", "description": "A simple launcher app for Bangle.js 2 that makes use of the full touchscreen", "icon": "app.png", "type": "launch",