Commit d62078e2 authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧
Browse files

Fix weird addons UI for certain resources (e.g. Flatpak)

In case there's no detailed list of addons but there's some other
resources that need listing, just open the view instead of a weird empty

BUG: 435823
parent 9cc9c764
......@@ -11,6 +11,7 @@ Kirigami.OverlaySheet {
property alias application: addonsModel.application
property bool isInstalling: false
readonly property alias addonsCount: listview.count
readonly property bool containsAddons: listview.count > 0 || isExtended
readonly property bool isExtended: ResourcesModel.isExtended(application.appstreamId)
......@@ -199,7 +199,11 @@ DiscoverPage {
id: addonsButton
text: i18n("Addons")
visible: addonsView.containsAddons
onClicked: addonsView.sheetOpen = true
onClicked: if (addonsView.addonsCount === 0) {
} else {
addonsView.sheetOpen = true
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment