From f25bf0989abe4efde31cc4bfba2bc663d1d05208 Mon Sep 17 00:00:00 2001 From: thyttan <6uuxstm66@mozmail.com⁩> Date: Sun, 30 Mar 2025 11:10:03 +0200 Subject: [PATCH] dtlaunch: Bangle 2: Fix showClocks and showLaunchers settings ... not taking effect by now clearing cache when changing those settings. --- apps/dtlaunch/ChangeLog | 2 ++ apps/dtlaunch/metadata.json | 2 +- apps/dtlaunch/settings-b2.js | 6 ++++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/apps/dtlaunch/ChangeLog b/apps/dtlaunch/ChangeLog index aac1c30bd..ae3c9bdec 100644 --- a/apps/dtlaunch/ChangeLog +++ b/apps/dtlaunch/ChangeLog @@ -32,3 +32,5 @@ when moving pages. Add caching for faster startups. 0.25: Minor code improvements 0.26: Bangle 2: Postpone loading icons that are not needed initially. 0.27: Bangle 2: Add setting to remember and present the last open page between instances of dtlaunch. +0.28: Bangle 2: Fix showClocks and showLaunchers settings not taking effect by + clearing cache when changing those settings. diff --git a/apps/dtlaunch/metadata.json b/apps/dtlaunch/metadata.json index 1ff75b953..f21decd32 100644 --- a/apps/dtlaunch/metadata.json +++ b/apps/dtlaunch/metadata.json @@ -1,7 +1,7 @@ { "id": "dtlaunch", "name": "Desktop Launcher", - "version": "0.27", + "version": "0.28", "description": "Desktop style App Launcher with six (four for Bangle 2) apps per page - fast access if you have lots of apps installed.", "screenshots": [{"url":"shot1.png"},{"url":"shot2.png"},{"url":"shot3.png"}], "icon": "icon.png", diff --git a/apps/dtlaunch/settings-b2.js b/apps/dtlaunch/settings-b2.js index dcad03a65..3fdc5de6e 100644 --- a/apps/dtlaunch/settings-b2.js +++ b/apps/dtlaunch/settings-b2.js @@ -17,6 +17,10 @@ const timeOutChoices = [/*LANG*/"Off", "10s", "15s", "20s", "30s"]; + function clearCache() { + require("Storage").erase("launch.cache.json") + } + E.showMenu({ "" : { "title" : "Desktop launcher" }, /*LANG*/"< Back" : () => back(), @@ -25,6 +29,7 @@ onchange: v => { settings.showClocks = v; writeSettings(); + clearCache(); } }, /*LANG*/'Show launchers': { @@ -32,6 +37,7 @@ onchange: v => { settings.showLaunchers = v; writeSettings(); + clearCache(); } }, /*LANG*/'Direct launch': {