fire default action on notification text click

This commit is contained in:
Damocles 2026-04-17 11:14:03 +02:00
parent 76ccc99e17
commit a2966f51ab

View file

@ -125,6 +125,29 @@ Item {
anchors.topMargin: 8
spacing: 2
// Text section tappable for default action
Item {
id: _textSection
width: parent.width
height: _textCol.implicitHeight
implicitHeight: _textCol.implicitHeight
TapHandler {
cursorShape: root.notif?.actions?.some(a => a.identifier === "default") ? Qt.PointingHandCursor : undefined
onTapped: {
const def = root.notif?.actions?.find(a => a.identifier === "default");
if (def) {
def.invoke();
root.dismissRequested();
}
}
}
Column {
id: _textCol
width: parent.width
spacing: 2
// App name + time row (optional)
Row {
visible: root.showAppName
@ -197,6 +220,8 @@ Item {
maximumLineCount: root.bodyMaxLines
visible: text !== ""
}
}
}
// Action buttons filter "default" (click-notification convention) and empty labels
Row {