some kind of fix lol

master
kkayam 2025-02-16 15:38:11 +00:00
parent 469241b244
commit 10d883255a
2 changed files with 10 additions and 10 deletions

View File

@ -1,16 +1,17 @@
{ {
let s = require('Storage');
let settings = Object.assign( let settings = Object.assign(
{ {
showClocks: false, showClocks: false,
scrollbar: true 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. // Borrowed caching from Icon Launcher, code by halemmerich.
let launchCache = s.readJSON('launch.cache.json', true) || {}; 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) { if (launchCache.hash != launchHash) {
launchCache = { launchCache = {
hash: launchHash, hash: launchHash,
@ -90,9 +91,6 @@
const lineLeft = 9; const lineLeft = 9;
const lineRight = overlayWidth - 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) // Draw inner lines (increased from ±1 to ±2)
overlay.setColor(g.theme.bg2); overlay.setColor(g.theme.bg2);
overlay.fillRect(lineLeft - 2, lineY1 - 1, lineRight + 2, lineY1 + 1); overlay.fillRect(lineLeft - 2, lineY1 - 1, lineRight + 2, lineY1 + 1);
@ -176,10 +174,12 @@
// Remove lock handler // Remove lock handler
Bangle.removeListener('lock'); Bangle.removeListener('lock');
// Remove drag handler // Remove drag handler
if (settings.scrollbar) {
Bangle.removeListener('drag', updateOnDrag); Bangle.removeListener('drag', updateOnDrag);
// Clear the scroll overlay // Clear the scroll overlay
Bangle.setLCDOverlay(); Bangle.setLCDOverlay();
} }
}
}); });
if (settings.scrollbar) { if (settings.scrollbar) {

View File

@ -2,7 +2,7 @@
"id": "cutelauncher", "id": "cutelauncher",
"name": "Cute Launcher", "name": "Cute Launcher",
"shortName": "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", "description": "A simple launcher app for Bangle.js 2 that makes use of the full touchscreen",
"icon": "app.png", "icon": "app.png",
"type": "launch", "type": "launch",