Merge lp:~boiko/dialer-app/rtm-fix_1410500 into lp:dialer-app/rtm-14.09

Proposed by Gustavo Pichorim Boiko
Status: Merged
Approved by: Bill Filler
Approved revision: 261
Merged at revision: 263
Proposed branch: lp:~boiko/dialer-app/rtm-fix_1410500
Merge into: lp:dialer-app/rtm-14.09
Diff against target: 81 lines (+43/-2)
3 files modified
src/qml/HistoryPage/HistoryDelegate.qml (+1/-1)
src/qml/HistoryPage/HistoryDetailsPage.qml (+17/-1)
tests/autopilot/dialer_app/tests/test_calls.py (+25/-0)
To merge this branch: bzr merge lp:~boiko/dialer-app/rtm-fix_1410500
Reviewer Review Type Date Requested Status
Ubuntu Phablet Team Pending
Review via email: mp+249228@code.launchpad.net

Commit message

Change HistoryDetailsPage to display the exact phone number that was used on each call and populate the Dialpad accordingly.

Description of the change

Change HistoryDetailsPage to display the exact phone number that was used on each call and populate the Dialpad accordingly.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/qml/HistoryPage/HistoryDelegate.qml'
2--- src/qml/HistoryPage/HistoryDelegate.qml 2014-12-16 01:39:49 +0000
3+++ src/qml/HistoryPage/HistoryDelegate.qml 2015-02-10 17:35:31 +0000
4@@ -51,7 +51,7 @@
5 }
6
7 // clicking an item only populates the dialpad view, it doesn't call directly
8- mainView.populateDialpad(participant.phoneNumber, mainView.account ? mainView.account.accountId : "");
9+ mainView.populateDialpad(model.remoteParticipant, mainView.account ? mainView.account.accountId : "");
10 }
11
12 function selectCallType() {
13
14=== modified file 'src/qml/HistoryPage/HistoryDetailsPage.qml'
15--- src/qml/HistoryPage/HistoryDetailsPage.qml 2015-01-13 12:08:06 +0000
16+++ src/qml/HistoryPage/HistoryDetailsPage.qml 2015-02-10 17:35:31 +0000
17@@ -261,14 +261,30 @@
18 left: parent.left
19 verticalCenter: parent.verticalCenter
20 }
21+ verticalAlignment: Qt.AlignVCenter
22+ }
23+
24+ Label {
25+ id: remoteParticipantId
26+ // FIXME: we need to check if the id is actually a phone number
27+ text: PhoneUtils.PhoneUtils.format(modelData.remoteParticipant)
28+ anchors {
29+ left: timeLabel.right
30+ leftMargin: units.gu(1)
31+ verticalCenter: parent.verticalCenter
32+ }
33 color: UbuntuColors.lightAubergine
34 verticalAlignment: Qt.AlignVCenter
35+ MouseArea {
36+ anchors.fill:parent
37+ onClicked: mainView.populateDialpad(modelData.remoteParticipant, mainView.account ? mainView.account.accountId : "");
38+ }
39 }
40
41 Label {
42 id: simLabel
43 anchors {
44- left: timeLabel.right
45+ left: remoteParticipantId.right
46 leftMargin: units.gu(1)
47 verticalCenter: timeLabel.verticalCenter
48 }
49
50=== modified file 'tests/autopilot/dialer_app/tests/test_calls.py'
51--- tests/autopilot/dialer_app/tests/test_calls.py 2014-09-30 00:49:13 +0000
52+++ tests/autopilot/dialer_app/tests/test_calls.py 2015-02-10 17:35:31 +0000
53@@ -170,3 +170,28 @@
54 except MismatchError as e:
55 print('Expected failure due to known Mir crash '
56 '(https://launchpad.net/bugs/1240400): %s' % e)
57+
58+ def test_last_called_number(self):
59+ number = "1234567"
60+ formattedNumber = "1 234-567"
61+
62+ number2 = "1231234567"
63+ formattedNumber2 = "1 231-234-567"
64+
65+ self.main_view.dialer_page.call_number(number, formattedNumber)
66+ time.sleep(1)
67+ self.main_view.live_call_page.click_hangup_button()
68+ self.main_view.dialer_page.active.wait_for(True)
69+
70+ self.main_view.dialer_page.call_number(number2, formattedNumber2)
71+ time.sleep(1)
72+ self.main_view.live_call_page.click_hangup_button()
73+ self.main_view.dialer_page.active.wait_for(True)
74+
75+ self.main_view.dialer_page.reveal_bottom_edge_page()
76+ self.assertThat(self.history_list.visible, Eventually(Equals(True)))
77+ self.assertThat(self.history_list.count, Eventually(Equals(1)))
78+ historyEntry = self.get_history_for_number(number)
79+ self.main_view._click_button(historyEntry)
80+ self.assertThat(
81+ self.main_view.dialer_page.dialNumber, Eventually(Equals(formattedNumber2)))

Subscribers

People subscribed via source and target branches