on xenial help sign in
Trigger actions via Notification's invokeAction() and not through NotificationModel's triggerAction().
commitbeaf4f41c80d6897c090f304298087deb3ff3dea authorMirco Müller <mirco.mueller@canonical.com> dateThu 13 Jun 2013, 11:39 (13 years ago) parente53e2a0
2 files changed+2−4
Notifications/Notification.qml+2−3 Notifications/Notifications.qml−1
Notifications/Notification.qml+2−3
@@ -28,7 +28,6 @@ UbuntuShape {
2828 property var actions
2929 property var notificationId
3030 property var type
31− property var notificationobj
3231
3332 signal actionInvoked(string buttonId)
3433
@@ -47,7 +46,7 @@ UbuntuShape {
4746 anchors.fill: contentColumn
4847 objectName: "interactiveArea"
4948 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))
5150 }
5251
5352 Column {
@@ -153,7 +152,7 @@ UbuntuShape {
153152 width: (buttonRow.width - buttonRow.spacing) / 2
154153 height: units.gu(4)
155154 text: label
156− onClicked: notification.notificationobj.invokeAction(id)
155+ onClicked: notificationRenderer.model.get(notificationId).invokeAction(id)
157156 }
158157 }
159158 }
Notifications/Notifications.qml−1
@@ -39,7 +39,6 @@ ListView {
3939 body: model.body
4040 actions: model.actions
4141 notificationId: model.id
42− notificationobj: model.notificationobj
4342 }
4443
4544 populate: Transition {