on xenial help sign in
fix positive/negative answer order on the new swipe notification Fixes: 1358343

Approved by: Mirco Müller, PS Jenkins bot

commit022cf0e916c5af2505ce0fd2944f791bf531034d authorMichael Zanetti <michael.zanetti@canonical.com> dateFri 7 Nov 2014, 14:30 (12 years ago) parent0c8b6e5ab2425e
2 files changed+8−8
qml/Notifications/Notification.qml+2−2 tests/qmltests/Notifications/tst_SwipeToAct.qml+6−6
qml/Notifications/Notification.qml+2−2
@@ -477,11 +477,11 @@ Item {
477477 width: buttonRow.width
478478 leftIconName: "call-end"
479479 rightIconName: "call-start"
480− onLeftTriggered: {
480+ onRightTriggered: {
481481 notification.notification.invokeAction(notification.actions.data(0, ActionModel.RoleActionId))
482482 }
483483
484− onRightTriggered: {
484+ onLeftTriggered: {
485485 notification.notification.invokeAction(notification.actions.data(1, ActionModel.RoleActionId))
486486 }
487487 }
tests/qmltests/Notifications/tst_SwipeToAct.qml+6−6
@@ -259,14 +259,14 @@ Item {
259259 var x = swipeMouseArea.width / 2
260260 var y = swipeMouseArea.height / 2
261261
262− if(data.checkSwipeToActReject) {
263− tryCompareFunction(function() { mouseDrag(slider, x, y, -(swipeMouseArea.width / 2), 0); return actionSpy.signalArguments.length > 0; }, true);
264− compare(actionSpy.signalArguments[0][0], data.actions.data(0, ActionModel.RoleActionId), "got wrong id for negative action")
265− actionSpy.clear()
266− }
267262 if(data.checkSwipeToActAccept) {
268263 tryCompareFunction(function() { mouseDrag(slider, x, y, (swipeMouseArea.width / 2) - slider.width, 0); return actionSpy.signalArguments.length > 0; }, true);
269− compare(actionSpy.signalArguments[0][0], data.actions.data(1, ActionModel.RoleActionId), "got wrong id for positive action")
264+ compare(actionSpy.signalArguments[0][0], data.actions.data(0, ActionModel.RoleActionId), "got wrong id for positive action")
265+ actionSpy.clear()
266+ }
267+ if(data.checkSwipeToActReject) {
268+ tryCompareFunction(function() { mouseDrag(slider, x, y, -(swipeMouseArea.width / 2), 0); return actionSpy.signalArguments.length > 0; }, true);
269+ compare(actionSpy.signalArguments[0][0], data.actions.data(1, ActionModel.RoleActionId), "got wrong id for negative action")
270270 actionSpy.clear()
271271 }
272272 }