Add model.isSupported checking

This commit is contained in:
Florian RICHER 2025-07-05 00:38:40 +02:00 committed by Devin Lin
parent 494e1242c3
commit 78a7e641e2

View file

@ -121,6 +121,10 @@ MouseArea {
readonly property string pluginName: model.pluginName
onPressAndHold: {
if (!model.isSupported) {
return
}
root.requestClose();
folio.HomeScreenState.closeSettingsView();
haptics.buttonVibrate();
@ -193,7 +197,7 @@ MouseArea {
Layout.alignment: Qt.AlignTop
// otherwise causes binding loop due to the way the Plasma sets the height
height: implicitHeight
text: model.description
text: model.isSupported ? model.description : model.unsupportedMessage
font.pointSize: Kirigami.Theme.smallFont.pointSize
wrapMode: Text.Wrap
elide: Text.ElideRight