on xenial help sign in
Rename NotificationRenderer's ListView... only pass notification object to delegate for invoking actions
commitf4e77415f030174a2e302390c2111f524c008656 authorMirco Müller <mirco.mueller@canonical.com> dateThu 13 Jun 2013, 12:41 (13 years ago) parentbeaf4f4
2 files changed+6−4
Notifications/Notification.qml+3−2 Notifications/Notifications.qml+3−2
Notifications/Notification.qml+3−2
@@ -28,6 +28,7 @@ UbuntuShape {
2828 property var actions
2929 property var notificationId
3030 property var type
31+ property var notification
3132
3233 signal actionInvoked(string buttonId)
3334
@@ -46,7 +47,7 @@ UbuntuShape {
4647 anchors.fill: contentColumn
4748 objectName: "interactiveArea"
4849 enabled: notification.type == Notification.Interactive
49− onClicked: notificationRenderer.model.get(notificationId).invokeAction(actionRepeater.model.actionId(0))
50+ onClicked: notification.notification.invokeAction(actionRepeater.model.actionId(0))
5051 }
5152
5253 Column {
@@ -152,7 +153,7 @@ UbuntuShape {
152153 width: (buttonRow.width - buttonRow.spacing) / 2
153154 height: units.gu(4)
154155 text: label
155− onClicked: notificationRenderer.model.get(notificationId).invokeAction(id)
156+ onClicked: notification.notification.invokeAction(id)
156157 }
157158 }
158159 }
Notifications/Notifications.qml+3−2
@@ -20,9 +20,9 @@ import "../Components"
2020import "timings.js" as Timings
2121
2222ListView {
23− id: notificationRenderer
23+ id: notificationList
2424
25− objectName: "notificationRenderer"
25+ objectName: "notificationList"
2626 interactive: false
2727
2828 spacing: units.gu(.5)
@@ -39,6 +39,7 @@ ListView {
3939 body: model.body
4040 actions: model.actions
4141 notificationId: model.id
42+ notification: notificationList.model.get(notificationId)
4243 }
4344
4445 populate: Transition {