Merge lp:~unity-team/unity8/fix-slide-to-accept-call into lp:unity8

Proposed by Michael Zanetti
Status: Merged
Approved by: Mirco Müller
Approved revision: 1420
Merged at revision: 1423
Proposed branch: lp:~unity-team/unity8/fix-slide-to-accept-call
Merge into: lp:unity8
Diff against target: 44 lines (+10/-10)
2 files modified
qml/Notifications/Notification.qml (+4/-4)
tests/qmltests/Notifications/tst_SwipeToAct.qml (+6/-6)
To merge this branch: bzr merge lp:~unity-team/unity8/fix-slide-to-accept-call
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Mirco Müller (community) Approve
Review via email: mp+240726@code.launchpad.net

Commit message

fix positive/negative answer order on the new swipe notification

Description of the change

 * Are there any related MPs required for this MP to build/function as expected? Please list.

no

 * Did you perform an exploratory manual test run of your code change and any related functionality?

yes

 * Did you make sure that your branch does not contain spurious tags?

yes

 * If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?

n/a

 * If you changed the UI, has there been a design review?

n/a

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Mirco Müller (macslow) wrote :

That's looking good.

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'qml/Notifications/Notification.qml'
2--- qml/Notifications/Notification.qml 2014-10-31 10:08:38 +0000
3+++ qml/Notifications/Notification.qml 2014-11-05 14:30:44 +0000
4@@ -477,11 +477,11 @@
5 width: buttonRow.width
6 leftIconName: "call-end"
7 rightIconName: "call-start"
8+ onRightTriggered: {
9+ notification.notification.invokeAction(notification.actions.data(0, ActionModel.RoleActionId))
10+ }
11+
12 onLeftTriggered: {
13- notification.notification.invokeAction(notification.actions.data(0, ActionModel.RoleActionId))
14- }
15-
16- onRightTriggered: {
17 notification.notification.invokeAction(notification.actions.data(1, ActionModel.RoleActionId))
18 }
19 }
20
21=== modified file 'tests/qmltests/Notifications/tst_SwipeToAct.qml'
22--- tests/qmltests/Notifications/tst_SwipeToAct.qml 2014-10-31 10:45:40 +0000
23+++ tests/qmltests/Notifications/tst_SwipeToAct.qml 2014-11-05 14:30:44 +0000
24@@ -259,14 +259,14 @@
25 var x = swipeMouseArea.width / 2
26 var y = swipeMouseArea.height / 2
27
28+ if(data.checkSwipeToActAccept) {
29+ tryCompareFunction(function() { mouseDrag(slider, x, y, (swipeMouseArea.width / 2) - slider.width, 0); return actionSpy.signalArguments.length > 0; }, true);
30+ compare(actionSpy.signalArguments[0][0], data.actions.data(0, ActionModel.RoleActionId), "got wrong id for positive action")
31+ actionSpy.clear()
32+ }
33 if(data.checkSwipeToActReject) {
34 tryCompareFunction(function() { mouseDrag(slider, x, y, -(swipeMouseArea.width / 2), 0); return actionSpy.signalArguments.length > 0; }, true);
35- compare(actionSpy.signalArguments[0][0], data.actions.data(0, ActionModel.RoleActionId), "got wrong id for negative action")
36- actionSpy.clear()
37- }
38- if(data.checkSwipeToActAccept) {
39- tryCompareFunction(function() { mouseDrag(slider, x, y, (swipeMouseArea.width / 2) - slider.width, 0); return actionSpy.signalArguments.length > 0; }, true);
40- compare(actionSpy.signalArguments[0][0], data.actions.data(1, ActionModel.RoleActionId), "got wrong id for positive action")
41+ compare(actionSpy.signalArguments[0][0], data.actions.data(1, ActionModel.RoleActionId), "got wrong id for negative action")
42 actionSpy.clear()
43 }
44 }

Subscribers

People subscribed via source and target branches