From f983a4c6b69ceed1b2b86f9d6a23edfb455e9353 Mon Sep 17 00:00:00 2001 From: Bruce Blore Date: Sat, 13 May 2023 04:39:24 -0700 Subject: [PATCH] Removed my own fast loading functionality in favor of using fast load utils --- apps/folderlaunch/README.md | 4 ---- apps/folderlaunch/app.ts | 31 +------------------------------ apps/folderlaunch/configLoad.ts | 2 -- apps/folderlaunch/settings.ts | 8 -------- apps/folderlaunch/types.d.ts | 1 - 5 files changed, 1 insertion(+), 45 deletions(-) diff --git a/apps/folderlaunch/README.md b/apps/folderlaunch/README.md index bef4ebc78..a0a03894c 100644 --- a/apps/folderlaunch/README.md +++ b/apps/folderlaunch/README.md @@ -11,8 +11,6 @@ The apps and folders will be presented in a grid layout, configurable in size. T Swiping up and down will scroll. Swiping from the left, using the back button, or pressing BTN1 will take you up a level to the folder containing the current one, or exit the launcher if you are at the top level. -The first time you launch an app, you will be asked if you want to fast load it, if the feature is enabled. Fast loading saves time by skipping much of the initialization between apps. Instead, the launcher just undoes the changes it made to the watch's state. However, fast loading can only be done between two apps that support widgets, so the decision to fast load has to be made for each app. The options are "Yes", "Not now", and "Never", so choose "Yes" if the app uses widgets, "Not now" if you don't remember, and "Never" if you know for sure it doesn't use widgets. - ## Settings menu * Show clocks / Show launcher: Whether clock and launcher apps are displayed in the UI to be launched. The default is no. @@ -26,8 +24,6 @@ The first time you launch an app, you will be asked if you want to fast load it, To prevent the launcher from becoming unusable, if neither icons nor text are enabled in the settings menu, text will still be drawn. -* Prompt for fast launch: If yes, when launching an app that does not yet have a setting saved, ask whether it should be fast loaded. If no, already saved settings are still applied, but apps that have not been assigned a setting will be slow loaded. The default is yes. - * Timeout: If the launcher is left idle for too long, return to the clock. This is convenient if you often accidentally open the launcher without noticing. At zero seconds, the timeout is disabled. The default is 30 seconds. * Folder management: Open the folder management menu for the root folder. (The folder first displayed when opening the launcher.) The folder management menu contains the following: diff --git a/apps/folderlaunch/app.ts b/apps/folderlaunch/app.ts index ef62687d7..122b17bb8 100644 --- a/apps/folderlaunch/app.ts +++ b/apps/folderlaunch/app.ts @@ -186,37 +186,8 @@ switch (entry.type) { case "app": Bangle.buzz(); - let app = config.apps[entry.id]!; let infoFile = storage.readJSON(entry.id + '.info', false); - if (app.fast) Bangle.load(infoFile.src); - else if (config.fastNag && !app.nagged) - E.showPrompt(/*LANG*/ 'Would you like to fast load?', { - title: infoFile.name, - buttons: { - "Yes": 0, - "Not now": 1, - "Never": 2 - } - }).then((value: number) => { - switch (value) { - case 0: - app.nagged = true; - app.fast = true; - loader.cleanAndSave(config); - Bangle.load(infoFile.src); - break; - case 1: - load(infoFile.src); - break; - default: - app.nagged = true; - loader.cleanAndSave(config); - load(infoFile.src); - break; - } - }); - else load(infoFile.src); - break; + load(infoFile.src); case "folder": Bangle.buzz(); resetTimeout(); diff --git a/apps/folderlaunch/configLoad.ts b/apps/folderlaunch/configLoad.ts index fc7c76306..95bdf2cb6 100644 --- a/apps/folderlaunch/configLoad.ts +++ b/apps/folderlaunch/configLoad.ts @@ -11,7 +11,6 @@ const DEFAULT_CONFIG: Config = { icon: true, font: 12 }, - fastNag: true, timeout: 30000, rootFolder: { folders: {}, @@ -128,7 +127,6 @@ export = { if (!config.apps.hasOwnProperty(app.id)) { config.apps[app.id] = { folder: [], - fast: false, nagged: false }; } diff --git a/apps/folderlaunch/settings.ts b/apps/folderlaunch/settings.ts index 1ce4bc0cd..b17b3cc36 100644 --- a/apps/folderlaunch/settings.ts +++ b/apps/folderlaunch/settings.ts @@ -245,14 +245,6 @@ } }); }, - 'Prompt for fast launch': { - value: config.fastNag, - format: value => (value ? 'Yes' : 'No'), - onchange: value => { - config.fastNag = value; - changed = true; - } - }, 'Timeout': { value: config.timeout, format: value => value ? `${value / 1000} sec` : 'None', diff --git a/apps/folderlaunch/types.d.ts b/apps/folderlaunch/types.d.ts index 878f11938..5567975a0 100644 --- a/apps/folderlaunch/types.d.ts +++ b/apps/folderlaunch/types.d.ts @@ -29,7 +29,6 @@ type Config = { icon: boolean, // Whether to show icons font: number // Which font to use for the name, or false to not show the name }, - fastNag: boolean, // Ask whether new apps should be fast-loaded the first time they are launched timeout: number, // How many ms before returning to the clock, or zero to never return rootFolder: Folder, // The top level folder, first displayed when opened apps: { // Saved info for each app