Merge pull request #3319 from atjn/launch-warn-2

`launch` Fix broken reset
master
Gordon Williams 2024-04-02 12:19:57 +01:00 committed by GitHub
commit ace9cd4b58
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 46 additions and 46 deletions

View File

@ -20,3 +20,4 @@
0.18: Add 'back' icon in top-left to go back to clock 0.18: Add 'back' icon in top-left to go back to clock
0.19: Fix regression after back button added (returnToClock was called twice!) 0.19: Fix regression after back button added (returnToClock was called twice!)
0.20: Use Bangle.showClock for changing to clock 0.20: Use Bangle.showClock for changing to clock
0.21: Make the "App source not found" warning less buggy

View File

@ -42,6 +42,7 @@ let apps = launchCache.apps;
if (!settings.fullscreen) if (!settings.fullscreen)
Bangle.loadWidgets(); Bangle.loadWidgets();
const drawMenu = () => {
E.showScroller({ E.showScroller({
h : 64*scaleval, c : apps.length, h : 64*scaleval, c : apps.length,
draw : (i, r) => { draw : (i, r) => {
@ -58,6 +59,7 @@ E.showScroller({
var app = apps[i]; var app = apps[i];
if (!app) return; if (!app) return;
if (!app.src || require("Storage").read(app.src)===undefined) { if (!app.src || require("Storage").read(app.src)===undefined) {
E.showScroller();
E.showMessage(/*LANG*/"App Source\nNot found"); E.showMessage(/*LANG*/"App Source\nNot found");
setTimeout(drawMenu, 2000); setTimeout(drawMenu, 2000);
} else { } else {
@ -83,6 +85,9 @@ let lockHandler = function(locked) {
lockTimeout = setTimeout(Bangle.showClock, 10000); lockTimeout = setTimeout(Bangle.showClock, 10000);
} }
Bangle.on("lock", lockHandler); Bangle.on("lock", lockHandler);
};
drawMenu();
if (!settings.fullscreen) // finally draw widgets if (!settings.fullscreen) // finally draw widgets
Bangle.drawWidgets(); Bangle.drawWidgets();
} }

View File

@ -2,7 +2,7 @@
"id": "launch", "id": "launch",
"name": "Launcher", "name": "Launcher",
"shortName": "Launcher", "shortName": "Launcher",
"version": "0.20", "version": "0.21",
"description": "This is needed to display a menu allowing you to choose your own applications. You can replace this with a customised launcher.", "description": "This is needed to display a menu allowing you to choose your own applications. You can replace this with a customised launcher.",
"readme": "README.md", "readme": "README.md",
"icon": "app.png", "icon": "app.png",

View File

@ -996,12 +996,6 @@ module.exports = {
"no-undef" "no-undef"
] ]
}, },
"launch/app.js": {
"hash": "7d5b7d7f2adbe4c8c137f76b6560a06437ab142cfeffb3f0ff261f1250a6b687",
"rules": [
"no-undef"
]
},
"kitchen/stepo2.kit.js": { "kitchen/stepo2.kit.js": {
"hash": "b7660bef1a2560f23ff696b03d297cdd39936ca61c01b3d0a316d49f9cf72590", "hash": "b7660bef1a2560f23ff696b03d297cdd39936ca61c01b3d0a316d49f9cf72590",
"rules": [ "rules": [