Skip to content

Commit e095a18

Browse files
committed
Fix regression where removing an app would remove the app before the yes/no prompt was answered!
fix espruino/BangleApps#3891
1 parent 7502f4c commit e095a18

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

js/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -840,14 +840,14 @@ function uploadApp(app, options) {
840840
/** Prompt user and then remove app from the device */
841841
function removeApp(app) {
842842
return showPrompt("Delete","Really remove '"+app.name+"'?")
843-
.then(startOperation({name:"Remove App"}, () => () => getInstalledApps())
843+
.then(() => startOperation({ name: "Remove App" }, () => getInstalledApps()
844844
.then(()=> Comms.removeApp(device.appsInstalled.find(a => a.id === app.id))) // a = from appid.info, app = from apps.json
845845
.then(()=>{
846846
device.appsInstalled = device.appsInstalled.filter(a=>a.id!=app.id);
847847
showToast(app.name+" removed successfully","success");
848848
}, err=>{
849849
showToast(app.name+" removal failed, "+err,"error");
850-
}));
850+
})));
851851
}
852852

853853
/** Show window for a new app and finally upload it */

0 commit comments

Comments
 (0)