mirror of https://github.com/espruino/BangleApps
Removed my own fast loading functionality in favor of using fast load utils
parent
aca4661620
commit
f983a4c6b6
|
@ -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:
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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
|
||||
};
|
||||
}
|
||||
|
|
|
@ -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',
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue