notifcard: filter default action identifier and empty action labels
This commit is contained in:
parent
5e9a8b0a44
commit
2e3f3a9f3c
1 changed files with 4 additions and 3 deletions
|
|
@ -198,13 +198,14 @@ Item {
|
||||||
visible: text !== ""
|
visible: text !== ""
|
||||||
}
|
}
|
||||||
|
|
||||||
// Action buttons
|
// Action buttons — filter "default" (click-notification convention) and empty labels
|
||||||
Row {
|
Row {
|
||||||
spacing: 6
|
spacing: 6
|
||||||
visible: !!(root.notif?.actions?.length)
|
visible: _actionRepeater.count > 0
|
||||||
|
|
||||||
Repeater {
|
Repeater {
|
||||||
model: root.notif?.actions ?? []
|
id: _actionRepeater
|
||||||
|
model: (root.notif?.actions ?? []).filter(a => a.text && a.identifier !== "default")
|
||||||
delegate: Rectangle {
|
delegate: Rectangle {
|
||||||
required property var modelData
|
required property var modelData
|
||||||
width: _actText.implicitWidth + 12
|
width: _actText.implicitWidth + 12
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue