Skip to content

Commit

Permalink
Add provides_features option to stop duplicates of things like 'Welco…
Browse files Browse the repository at this point in the history
…me' that do similar jobs but don't provide modules/widgets
  • Loading branch information
gfwilliams committed Nov 14, 2024
1 parent cbf53ec commit ea066f9
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions js/appinfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,16 @@ var AppInfo = {
}
});
}
if (app.provides_features) {
app.provides_features.forEach(feature => {
let existing = appJSONInstalled.find(app =>
app.provides_features && app.provides_features.includes(feature));
if (existing) {
let msg = `App "${app.name}" provides feature '"${feature}"' which is already provided by "${existing.name}"`;
promise = promise.then(() => uploadOptions.showQuery(msg, existing));
}
});
}
if (app.type=="launch") {
let existing = appJSONInstalled.find(app => app.type=="launch");
if (existing) {
Expand Down

0 comments on commit ea066f9

Please sign in to comment.