Skip to content

Commit ea066f9

Browse files
committed
Add provides_features option to stop duplicates of things like 'Welcome' that do similar jobs but don't provide modules/widgets
1 parent cbf53ec commit ea066f9

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

js/appinfo.js

+10
Original file line numberDiff line numberDiff line change
@@ -390,6 +390,16 @@ var AppInfo = {
390390
}
391391
});
392392
}
393+
if (app.provides_features) {
394+
app.provides_features.forEach(feature => {
395+
let existing = appJSONInstalled.find(app =>
396+
app.provides_features && app.provides_features.includes(feature));
397+
if (existing) {
398+
let msg = `App "${app.name}" provides feature '"${feature}"' which is already provided by "${existing.name}"`;
399+
promise = promise.then(() => uploadOptions.showQuery(msg, existing));
400+
}
401+
});
402+
}
393403
if (app.type=="launch") {
394404
let existing = appJSONInstalled.find(app => app.type=="launch");
395405
if (existing) {

0 commit comments

Comments
 (0)