aurora037e2ee
aurora: fix ReferenceError after clicking a notification action
+6 −1
1 file changed
| @@ -103,7 +103,12 @@ Rectangle { | |||
| 103 | 103 | required property var modelData | |
| 104 | 104 | label: modelData.text | |
| 105 | 105 | implicitHeight: 24 | |
| 106 | − | onClicked: { modelData.invoke(); if (card.popup) Notifs.dropPopup(card.n) } | |
| 106 | + | // invoke() can close the notification and destroy this card: read everything first | |
| 107 | + | onClicked: { | |
| 108 | + | var action = modelData, n = card.n, popup = card.popup | |
| 109 | + | action.invoke() | |
| 110 | + | if (popup) Notifs.dropPopup(n) | |
| 111 | + | } | |
| 107 | 112 | } | |
| 108 | 113 | } | |
| 109 | 114 | } | |