notifs: invoke action on click if only single action
This commit is contained in:
parent
ae67668fc2
commit
0b0657314f
2 changed files with 6 additions and 0 deletions
|
|
@ -57,6 +57,11 @@ StyledRect {
|
||||||
root.expanded = diffY > 0;
|
root.expanded = diffY > 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
onClicked: {
|
||||||
|
const actions = root.modelData.actions;
|
||||||
|
if (actions.length === 1)
|
||||||
|
root.modelData.actions[0].invoke();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Behavior on x {
|
Behavior on x {
|
||||||
|
|
|
||||||
|
|
@ -55,6 +55,7 @@ Singleton {
|
||||||
readonly property string appIcon: notification.appIcon
|
readonly property string appIcon: notification.appIcon
|
||||||
readonly property string appName: notification.appName
|
readonly property string appName: notification.appName
|
||||||
readonly property string image: notification.image
|
readonly property string image: notification.image
|
||||||
|
readonly property list<NotificationAction> actions: notification.actions
|
||||||
|
|
||||||
readonly property Timer timer: Timer {
|
readonly property Timer timer: Timer {
|
||||||
running: true
|
running: true
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue