Skip to content

Commit e137d4f

Browse files
authored
Include app ID in toast messages, as well as app name
1 parent f17383a commit e137d4f

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

js/index.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -841,7 +841,7 @@ function uploadApp(app, options) {
841841
if (appJSON) {
842842
device.appsInstalled.push(appJSON);
843843
}
844-
showToast(app.name + ' Uploaded!', 'success');
844+
showToast(app.name +" ("+app.id+") "+ ' Uploaded!', 'success');
845845
}).catch(err => {
846846
showToast('Upload failed, ' + err, 'error');
847847
});
@@ -850,14 +850,14 @@ function uploadApp(app, options) {
850850

851851
/** Prompt user and then remove app from the device */
852852
function removeApp(app) {
853-
return showPrompt("Delete","Really remove '"+app.name+"'?")
853+
return showPrompt("Delete", "Are you sure you want to delete "+app.name +" ("+app.id+")?")
854854
.then(() => startOperation({ name: "Remove App" }, () => getInstalledApps()
855855
.then(()=> Comms.removeApp(device.appsInstalled.find(a => a.id === app.id))) // a = from appid.info, app = from apps.json
856856
.then(()=>{
857857
device.appsInstalled = device.appsInstalled.filter(a=>a.id!=app.id);
858-
showToast(app.name+" removed successfully","success");
858+
showToast(app.name +" ("+app.id+")"+" removed successfully","success");
859859
}, err=>{
860-
showToast(app.name+" removal failed, "+err,"error");
860+
showToast("Removal of "+app.name +" ("+app.id+")"+" failed, "+err,"error");
861861
})));
862862
}
863863

@@ -952,13 +952,13 @@ function updateApp(app, options) {
952952
remove.data = AppInfo.makeDataString(data)
953953
return Comms.removeApp(remove, {containsFileList:true, noReset:options.noReset, noFinish:options.noFinish});
954954
}).then(()=>{
955-
showToast(`Updating ${app.name}...`);
955+
showToast("Updating "+app.name +" ("+app.id+")...");
956956
device.appsInstalled = device.appsInstalled.filter(a=>a.id!=app.id);
957957
return checkDependencies(app,{checkForClashes:false});
958958
}).then(()=>Comms.uploadApp(app,{device:device,language:LANGUAGE,noReset:options.noReset, noFinish:options.noFinish})
959959
).then((appJSON) => {
960960
if (appJSON) device.appsInstalled.push(appJSON);
961-
showToast(app.name+" Updated!", "success");
961+
showToast(app.name +" ("+app.id+")"+" Updated!", "success");
962962
}));
963963
}
964964

@@ -1162,7 +1162,7 @@ function installMultipleApps(appIds, promptName) {
11621162
}).then(()=> Comms.setTime()
11631163
).then(()=> Comms.showUploadFinished()
11641164
).then(()=>{
1165-
showToast("Apps successfully installed!","success");
1165+
showToast(appCount+" apps successfully installed!","success");
11661166
return getInstalledApps(true);
11671167
});
11681168
}

0 commit comments

Comments
 (0)