@@ -33,8 +33,7 @@ Item {
3333 Notification {
3434 id: mockNotificationDefault
3535 type: Notification.PlaceHolder
36− nid: 1 //mockModel.getNextId()
37− //hints: {}
36+ nid: 1
3837 summary: ""
3938 body: ""
4039 icon: ""
@@ -47,18 +46,11 @@ Item {
4746 dynamicRoles: true
4847
4948 signal actionInvoked(string actionId)
50− property var internalId: 0
5149
52− function getNextId() {
53− return internalId++
54− }
55−
56− function getRaw(nid) {
57− print ("Looking for:", nid)
50+ function getRaw(id) {
5851 for (var i = 0; i < mockModel.count; i++) {
59− if (nid === mockModel.get(i).nid) {
60− print ("Found something...", i)
61− return mockModel.get(i).notification
52+ if (id === mockModel.get(i).nid) {
53+ return mockModel.get(i)
6254 }
6355 }
6456 }
@@ -72,7 +64,7 @@ Item {
7264 Notification {
7365 id: mock2over1SnapDecisionNotification
7466 type: Notification.SnapDecision
75− nid: 2 //mockModel.getNextId()
67+ nid: 2
7668 hints: {"x-canonical-private-affirmative-tint": "true"}
7769 summary: "Theatre at Ferria Stadium"
7870 body: "at Ferria Stadium in Bilbao, Spain\n07578545317"
@@ -85,12 +77,20 @@ Item {
8577
8678 function add2over1SnapDecisionNotification() {
8779 mockModel.append(mock2over1SnapDecisionNotification)
80+
81+ // trying out/debugging stuff
82+ mockModel.getRaw(2).close()
83+ print("summary:", mock2over1SnapDecisionNotification.summary)
84+ print("summary:", mockModel.getRaw(2).summary)
85+ print("summary:", mockModel.get(1).summary)
86+ mock2over1SnapDecisionNotification.close()
87+ mock2over1SnapDecisionNotification.invokeAction("ok_id")
8888 }
8989
9090 Notification {
9191 id: mockEphemeralNotification
9292 type: Notification.Ephemeral
93− nid: 3 //mockModel.getNextId()
93+ nid: 3
9494 summary: "Cole Raby"
9595 body: "I did not expect it to be that late."
9696 icon: "../graphics/avatars/amanda.png"
@@ -105,7 +105,7 @@ Item {
105105 Notification {
106106 id: mockEphemeralNonShapedIconNotification
107107 type: Notification.Ephemeral
108− nid: 4 //mockModel.getNextId()
108+ nid: 4
109109 hints: {"x-canonical-non-shaped-icon": "true"}
110110 summary: "Contacts"
111111 body: "Synchronised contacts-database with cloud-storage."
@@ -121,7 +121,7 @@ Item {
121121 Notification {
122122 id: mockEphemeralIconSummaryNotification
123123 type: Notification.Ephemeral
124− nid: 5 //mockModel.getNextId()
124+ nid: 5
125125 hints: {"x-canonical-non-shaped-icon": "false"}
126126 summary: "Photo upload completed"
127127 body: ""
@@ -137,7 +137,7 @@ Item {
137137 Notification {
138138 id: mockInteractiveNotification
139139 type: Notification.Interactive
140− nid: 6 //mockModel.getNextId()
140+ nid: 6
141141 summary: "Interactive notification"
142142 body: "This is a notification that can be clicked"
143143 icon: "../graphics/avatars/anna_olsson.png"
@@ -152,7 +152,7 @@ Item {
152152 Notification {
153153 id: mockConfirmationNotification
154154 type: Notification.Confirmation
155− nid: 7 //mockModel.getNextId()
155+ nid: 7
156156 hints: {"x-canonical-non-shaped-icon": "true"}
157157 summary: "Confirmation notification"
158158 body: ""
@@ -169,7 +169,7 @@ Item {
169169 Notification {
170170 id: mock2ndConfirmationNotification
171171 type: Notification.Confirmation
172− nid: 8 //mockModel.getNextId()
172+ nid: 8
173173 hints: {"x-canonical-non-shaped-icon": "true",
174174 "x-canonical-value-bar-tint": "true"}
175175 summary: "Confirmation notification"
@@ -295,7 +295,7 @@ Item {
295295 {
296296 tag: "2-over-1 Snap Decision with button-tint",
297297 type: Notification.SnapDecision,
298− //nid: mockModel.getNextId(),
298+ nid: 2,
299299 hints: {"x-canonical-private-affirmative-tint": "true"},
300300 summary: "Theatre at Ferria Stadium",
301301 body: "at Ferria Stadium in Bilbao, Spain\n07578545317",
@@ -321,7 +321,7 @@ Item {
321321 {
322322 tag: "Ephemeral notification - icon-summary layout",
323323 type: Notification.Ephemeral,
324− //nid: mockModel.getNextId(),
324+ nid: 3,
325325 hints: {},
326326 summary: "Photo upload completed",
327327 body: "",
@@ -345,7 +345,7 @@ Item {
345345 {
346346 tag: "Ephemeral notification - check suppression of secondary icon for icon-summary layout",
347347 type: Notification.Ephemeral,
348− //nid: mockModel.getNextId(),
348+ nid: 4,
349349 hints: {"x-canonical-private-affirmative-tint": "false",
350350 "sound-file": "dummy.ogg",
351351 "suppress-sound": "true"},
@@ -372,7 +372,7 @@ Item {
372372 {
373373 tag: "Interactive notification",
374374 type: Notification.Interactive,
375− //nid: mockModel.getNextId(),
375+ nid: 5,
376376 hints: {"x-canonical-private-affirmative-tint": "false",
377377 "sound-file": "dummy.ogg"},
378378 summary: "Interactive notification",
@@ -397,7 +397,7 @@ Item {
397397 {
398398 tag: "Snap Decision without secondary icon and no button-tint",
399399 type: Notification.SnapDecision,
400− //nid: mockModel.getNextId(),
400+ nid: 6,
401401 hints: {"x-canonical-private-affirmative-tint": "false",
402402 "sound-file": "dummy.ogg"},
403403 summary: "Bro Coly",
@@ -423,7 +423,7 @@ Item {
423423 {
424424 tag: "Ephemeral notification",
425425 type: Notification.Ephemeral,
426− //nid: mockModel.getNextId(),
426+ nid: 7,
427427 hints: {"x-canonical-private-affirmative-tint": "false",
428428 "sound-file": "dummy.ogg"},
429429 summary: "Cole Raby",
@@ -448,7 +448,7 @@ Item {
448448 {
449449 tag: "Ephemeral notification with non-shaped icon",
450450 type: Notification.Ephemeral,
451− //nid: mockModel.getNextId(),
451+ nid: 8,
452452 hints: {"x-canonical-private-affirmative-tint": "false",
453453 "x-canonical-non-shaped-icon": "true"},
454454 summary: "Contacts",
@@ -473,7 +473,7 @@ Item {
473473 {
474474 tag: "Confirmation notification with value",
475475 type: Notification.Confirmation,
476− //nid: mockModel.getNextId(),
476+ nid: 9,
477477 hints: {"x-canonical-non-shaped-icon": "true"},
478478 summary: "",
479479 body: "",
@@ -497,7 +497,7 @@ Item {
497497 {
498498 tag: "Confirmation notification with value, label and tint",
499499 type: Notification.Confirmation,
500− //nid: mockModel.getNextId(),
500+ nid: 10,
501501 hints: {"x-canonical-non-shaped-icon": "true",
502502 "x-canonical-value-bar-tint" : "true"},
503503 summary: "",