No suggestion for installed add-ons (#2226)

Suggestions are being shown in the add-on store for add-ons that are already installed.
This PR removes suggestions for installed add-ons.

See request here https://github.com/openhab/openhab-core/issues/3868#issuecomment-1859950504.

---------

Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
pull/2230/head
Mark Herwege 2023-12-19 18:49:11 +01:00 committed by GitHub
parent d52296a0e1
commit f94187652e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -226,7 +226,7 @@ export default {
return Object.keys(this.addons).flatMap((k) => this.addons[k])
},
suggestedAddons () {
return Object.keys(this.addons).flatMap((k) => this.addons[k]).filter((a) => this.suggestions.some((s) => s.id === a.id))
return Object.keys(this.addons).flatMap((k) => this.addons[k]).filter((a) => !a.installed && this.suggestions.some((s) => s.id === a.id))
},
unsuggestedAddons () {
return Object.keys(this.addons).flatMap((k) => this.addons[k]).filter((a) => !this.suggestedAddons.includes(a))