on xenial help sign in
Trigger actions via Notification's invokeAction() and not through NotificationModel's triggerAction().
beaf4f4Mirco Müller
Notifications/Notification.qml+2−3
@@ -28,7 +28,6 @@ UbuntuShape {
28 property var actions
28 property var actions
29 property var notificationId
29 property var notificationId
30 property var type
30 property var type
31− property var notificationobj
32
31
33 signal actionInvoked(string buttonId)
32 signal actionInvoked(string buttonId)
34
33
@@ -47,7 +46,7 @@ UbuntuShape {
47 anchors.fill: contentColumn
46 anchors.fill: contentColumn
48 objectName: "interactiveArea"
47 objectName: "interactiveArea"
49 enabled: notification.type == Notification.Interactive
48 enabled: notification.type == Notification.Interactive
50− onClicked: notification.notificationobj.invokeAction(actionRepeater.model.actionId(0))
49+ onClicked: notificationRenderer.model.get(notificationId).invokeAction(actionRepeater.model.actionId(0))
51 }
50 }
52
51
53 Column {
52 Column {
@@ -153,7 +152,7 @@ UbuntuShape {
153 width: (buttonRow.width - buttonRow.spacing) / 2
152 width: (buttonRow.width - buttonRow.spacing) / 2
154 height: units.gu(4)
153 height: units.gu(4)
155 text: label
154 text: label
156− onClicked: notification.notificationobj.invokeAction(id)
155+ onClicked: notificationRenderer.model.get(notificationId).invokeAction(id)
157 }
156 }
158 }
157 }
159 }
158 }
Notifications/Notifications.qml−1
@@ -39,7 +39,6 @@ ListView {
39 body: model.body
39 body: model.body
40 actions: model.actions
40 actions: model.actions
41 notificationId: model.id
41 notificationId: model.id
42− notificationobj: model.notificationobj
43 }
42 }
44
43
45 populate: Transition {
44 populate: Transition {