mirror of https://github.com/espruino/BangleApps
Fix issue removing an app that was just installed. Fix #253Fix issue removing an app that was just installed (Fix #253)
parent
a96e69af9c
commit
d46e78808e
|
@ -6,3 +6,4 @@ Changed for individual apps are listed in `apps/appname/ChangeLog`
|
||||||
* `Remove All Apps` now doesn't perform a reset before erase - fixes inability to update firmware if settings are wrong
|
* `Remove All Apps` now doesn't perform a reset before erase - fixes inability to update firmware if settings are wrong
|
||||||
* Added optional `README.md` file for apps
|
* Added optional `README.md` file for apps
|
||||||
* Remove 2v04 version warning, add links in About to official/developer versions
|
* Remove 2v04 version warning, add links in About to official/developer versions
|
||||||
|
* Fix issue removing an app that was just installed (Fix #253)
|
||||||
|
|
|
@ -16,6 +16,11 @@ uploadApp : (app,skipReset) => { // expects an apps.json structure (i.e. with `s
|
||||||
var maxBytes = fileContents.reduce((b,f)=>b+f.content.length, 0)||1;
|
var maxBytes = fileContents.reduce((b,f)=>b+f.content.length, 0)||1;
|
||||||
var currentBytes = 0;
|
var currentBytes = 0;
|
||||||
|
|
||||||
|
var appInfoFileName = app.id+".info";
|
||||||
|
var appInfoFile = fileContents.find(f=>f.name==appInfoFileName);
|
||||||
|
if (!appInfoFile) reject(`${appInfoFileName} not found`);
|
||||||
|
var appInfo = JSON.parse(appInfoFile.content);
|
||||||
|
|
||||||
// Upload each file one at a time
|
// Upload each file one at a time
|
||||||
function doUploadFiles() {
|
function doUploadFiles() {
|
||||||
// No files left - print 'reboot' message
|
// No files left - print 'reboot' message
|
||||||
|
@ -23,7 +28,7 @@ uploadApp : (app,skipReset) => { // expects an apps.json structure (i.e. with `s
|
||||||
Puck.write(`\x10E.showMessage('Hold BTN3\\nto reload')\n`,(result) => {
|
Puck.write(`\x10E.showMessage('Hold BTN3\\nto reload')\n`,(result) => {
|
||||||
Progress.hide({sticky:true});
|
Progress.hide({sticky:true});
|
||||||
if (result===null) return reject("");
|
if (result===null) return reject("");
|
||||||
resolve(app);
|
resolve(appInfo);
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue