on xenial help sign in
Use Loader for the swipeToAct widget to save some resources, if it is not used.
69b793fMirco Müller
qml/Notifications/Notification.qml+19−13
@@ -404,21 +404,27 @@ Item {
404 spacing: units.gu(2)
404 spacing: units.gu(2)
405 layoutDirection: Qt.RightToLeft
405 layoutDirection: Qt.RightToLeft
406
406
407− SwipeToAct {
407+ Loader {
408+ id: notifySwipeButtonLoader
409+
410+ Component {
408− id: notifySwipeButton
411+ id: notifySwipeButton
412+
413+ SwipeToAct {
409− objectName: "notify_swipe_button"
414+ objectName: "notify_swipe_button"
410− visible: notification.hints["x-canonical-snap-decisions-swipe"] === "true"
415+ width: buttonRow.width
411− leftIconName: "call-end"
416+ leftIconName: "call-end"
412− rightIconName: "call-start"
417+ rightIconName: "call-start"
413− width: buttonRow.width
414−
415− onLeftTriggered: {
418+ onLeftTriggered: {
416− notification.notification.invokeAction(notification.actions.data(0, ActionModel.RoleActionId))
419+ notification.notification.invokeAction(notification.actions.data(0, ActionModel.RoleActionId))
417− }
420+ }
418
421
419− onRightTriggered: {
422+ onRightTriggered: {
420− notification.notification.invokeAction(notification.actions.data(1, ActionModel.RoleActionId))
423+ notification.notification.invokeAction(notification.actions.data(1, ActionModel.RoleActionId))
424+ }
425+ }
421 }
426 }
427+ sourceComponent: notification.hints["x-canonical-snap-decisions-swipe"] === "true" ? notifySwipeButton : undefined
422 }
428 }
423
429
424 Repeater {
430 Repeater {