diff --git a/apps/launch/ChangeLog b/apps/launch/ChangeLog index 65f671bbd..955061e19 100644 --- a/apps/launch/ChangeLog +++ b/apps/launch/ChangeLog @@ -17,3 +17,4 @@ 0.15: Support for unload and quick return to the clock on 2v16 0.16: Use a cache of app.info files to speed up loading the launcher 0.17: Don't display 'Loading...' now the watch has its own loading screen +0.18: Add 'back' icon in top-left to go back to clock diff --git a/apps/launch/app.js b/apps/launch/app.js index 3b33e530a..e9f99d8f5 100644 --- a/apps/launch/app.js +++ b/apps/launch/app.js @@ -41,6 +41,17 @@ let apps = launchCache.apps; // Now apps list is loaded - render if (!settings.fullscreen) Bangle.loadWidgets(); + +let returnToClock = function() { + // unload everything manually + // ... or we could just call `load();` but it will be slower + Bangle.setUI(); // remove scroller's handling + if (lockTimeout) clearTimeout(lockTimeout); + Bangle.removeListener("lock", lockHandler); + // now load the default clock - just call .bootcde as this has the code already + setTimeout(eval,0,s.read(".bootcde")); +} + E.showScroller({ h : 64*scaleval, c : apps.length, draw : (i, r) => { @@ -62,19 +73,12 @@ E.showScroller({ } else { load(app.src); } - } + }, + back : returnToClock }); g.flip(); // force a render before widgets have finished drawing -let returnToClock = function() { - // unload everything manually - // ... or we could just call `load();` but it will be slower - Bangle.setUI(); // remove scroller's handling - if (lockTimeout) clearTimeout(lockTimeout); - Bangle.removeListener("lock", lockHandler); - // now load the default clock - just call .bootcde as this has the code already - setTimeout(eval,0,s.read(".bootcde")); -} + // on bangle.js 2, the screen is used for navigating, so the single button goes back // on bangle.js 1, the buttons are used for navigating diff --git a/apps/launch/metadata.json b/apps/launch/metadata.json index 8d6d90fb1..d6770524c 100644 --- a/apps/launch/metadata.json +++ b/apps/launch/metadata.json @@ -2,7 +2,7 @@ "id": "launch", "name": "Launcher", "shortName": "Launcher", - "version": "0.17", + "version": "0.18", "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", "icon": "app.png",