@@ -405,10 +405,26 @@ Item {
405405 spacing: units.gu(2)
406406 layoutDirection: Qt.RightToLeft
407407
408+ SwipeToAct {
409+ objectName: "notify_swipe_button"
410+ visible: notification.hints["x-canonical-snap-decisions-swipe"] === "true"
411+ leftIconName: "call-end"
412+ rightIconName: "call-start"
413+ width: buttonRow.width
414+
415+ onLeftTriggered: {
416+ notification.notification.invokeAction(notification.actions.data(0, ActionModel.RoleActionId))
417+ }
418+
419+ onRightTriggered: {
420+ notification.notification.invokeAction(notification.actions.data(1, ActionModel.RoleActionId))
421+ }
422+ }
423+
408424 Repeater {
409425 id: actionRepeater
410−
411426 model: notification.actions
427+ visible: notification.hints["x-canonical-snap-decisions-swipe"] !== "true"
412428 delegate: Loader {
413429 id: loader
414430
@@ -418,9 +434,9 @@ Item {
418434 Component {
419435 id: actionButton
420436
421− /*Button {
437+ Button {
422438 objectName: "notify_button" + index
423− width: buttonRow.width / 2 - spacing*2
439+ width: buttonRow.width / 2 - spacing * 2
424440 text: loader.actionLabel
425441 color: {
426442 var result = sdDarkGrey;
@@ -433,25 +449,9 @@ Item {
433449 return result;
434450 }
435451 onClicked: notification.notification.invokeAction(loader.actionId)
436− }*/
437−
438− SwipeToAct {
439− objectName: "notify_button" + index
440−
441− leftIconName: "call-end"
442− rightIconName: "call-start"
443− width: buttonRow.width
444−
445− onLeftTriggered: {
446− notification.notification.invokeAction(loader.actionId)
447− }
448−
449− onRightTriggered: {
450− notification.notification.invokeAction(loader.actionId)
451− }
452452 }
453453 }
454− sourceComponent: (index == 0) ? actionButton : undefined
454+ sourceComponent: (index == 0 || index == 1) ? actionButton : undefined
455455 }
456456 }
457457 }