Merge lp:~renatofilho/dialer-app/non-expansion into lp:dialer-app

Proposed by Renato Araujo Oliveira Filho
Status: Merged
Approved by: Gustavo Pichorim Boiko
Approved revision: 412
Merged at revision: 411
Proposed branch: lp:~renatofilho/dialer-app/non-expansion
Merge into: lp:dialer-app
Prerequisite: lp:~renatofilho/dialer-app/addressbook-components
Diff against target: 132 lines (+17/-38)
5 files modified
src/qml/ContactsPage/ContactsPage.qml (+6/-21)
src/qml/HistoryPage/HistoryDetailsPage.qml (+1/-1)
src/qml/HistoryPage/HistoryPage.qml (+1/-1)
src/qml/dialer-app.qml (+8/-9)
tests/autopilot/dialer_app/__init__.py (+1/-6)
To merge this branch: bzr merge lp:~renatofilho/dialer-app/non-expansion
Reviewer Review Type Date Requested Status
Gustavo Pichorim Boiko (community) Approve
PS Jenkins bot continuous-integration Needs Fixing
Review via email: mp+258545@code.launchpad.net

This proposal supersedes a proposal from 2015-05-07.

Commit message

Implement support for no-expandable contacts list

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
408. By Renato Araujo Oliveira Filho

Parent merged.

409. By Renato Araujo Oliveira Filho

Update autopilot.

410. By Renato Araujo Oliveira Filho

Parent merged.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Renato Araujo Oliveira Filho (renatofilho) wrote :

Are there any related MPs required for this MP to build/function as expected?
YES: https://code.launchpad.net/~renatofilho/address-book-app/no-expasion/+merge/258546

Is your branch in sync with latest trunk?
YES

Did you perform an exploratory manual test run of your code change and any related functionality on device or emulator?
YES

Did you successfully run all tests found in your component's Test Plan on device or emulator?
YES

If you changed the UI, was the change specified/approved by design?
YES

If you changed UI labels, did you update the pot file?
NO LABEL CHANGE

If you changed the packaging (debian), did you add a core-dev as a reviewer to this MP?
NO PACKAGE CHANGE

411. By Renato Araujo Oliveira Filho

parent merged.

412. By Renato Araujo Oliveira Filho

Parent merged.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Gustavo Pichorim Boiko (boiko) wrote :

Did you perform an exploratory manual test run of the code change and any related functionality on device or emulator?
Yes

Did CI run pass? If not, please explain why.
No: this branch needs changes on address-book-app

Have you checked that submitter has accurately filled out the submitter checklist and has taken no shortcut?
Yes

review: Approve
413. By Renato Araujo Oliveira Filho

Parent merged.

414. By Renato Araujo Oliveira Filho

Avoid fetch contact twice.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/qml/ContactsPage/ContactsPage.qml'
2--- src/qml/ContactsPage/ContactsPage.qml 2015-05-15 18:04:48 +0000
3+++ src/qml/ContactsPage/ContactsPage.qml 2015-05-15 18:04:48 +0000
4@@ -161,6 +161,8 @@
5 showImportOptions: (contactList.count === 0) &&
6 (filterTerm === "") &&
7 (contactsPage.phoneToAdd === "")
8+ filterTerm: searchField.text
9+
10 onAddNewContactClicked: {
11 var newContact = ContactsJS.createEmptyContact(contactsPage.phoneToAdd, contactsPage)
12 pageStack.push(Qt.resolvedUrl("../ContactEditorPage/DialerContactEditorPage.qml"),
13@@ -170,35 +172,18 @@
14 contactListPage: contactsPage
15 })
16 }
17- onInfoRequested: mainView.viewContact(contact.contactId, contactList.listModel)
18-
19- filterTerm: searchField.text
20- detailToPick: (contactsPage.phoneToAdd != "") ? -1 : ContactDetail.PhoneNumber
21- onDetailClicked: {
22- if (action === "message") {
23- Qt.openUrlExternally("message:///" + encodeURIComponent(detail.number))
24- return
25- }
26-
27+ onContactClicked: {
28 if (contactsPage.phoneToAdd != "") {
29 mainView.addPhoneToContact(contact,
30 contactsPage.phoneToAdd,
31 contactsPage,
32 contactList.listModel)
33- return
34- }
35-
36- pageStackNormalMode.pop()
37- if (callManager.hasCalls) {
38- mainView.call(detail.number, mainView.account.accountId);
39 } else {
40- mainView.populateDialpad(detail.number)
41+ mainView.viewContact(contact,
42+ contactsPage,
43+ contactList.listModel)
44 }
45 }
46- onAddDetailClicked: mainView.addPhoneToContact(contact.contactId,
47- " ",
48- contactsPage,
49- contactList.listModel)
50 }
51
52 Component.onCompleted: {
53
54=== modified file 'src/qml/HistoryPage/HistoryDetailsPage.qml'
55--- src/qml/HistoryPage/HistoryDetailsPage.qml 2015-05-15 18:04:48 +0000
56+++ src/qml/HistoryPage/HistoryDetailsPage.qml 2015-05-15 18:04:48 +0000
57@@ -57,7 +57,7 @@
58 if (unknownContact) {
59 mainView.addNewPhone(phoneNumber)
60 } else {
61- mainView.viewContact(contactWatcher.contactId, null)
62+ mainView.viewContact(contactWatcher.contactId, null, null)
63 }
64 }
65 },
66
67=== modified file 'src/qml/HistoryPage/HistoryPage.qml'
68--- src/qml/HistoryPage/HistoryPage.qml 2015-05-15 18:04:48 +0000
69+++ src/qml/HistoryPage/HistoryPage.qml 2015-05-15 18:04:48 +0000
70@@ -347,7 +347,7 @@
71 if (unknownContact) {
72 mainView.addNewPhone(phoneNumber)
73 } else {
74- mainView.viewContact(contactId, null)
75+ mainView.viewContact(contactId, null, null)
76 }
77 }
78 visible: knownNumber
79
80=== modified file 'src/qml/dialer-app.qml'
81--- src/qml/dialer-app.qml 2015-05-15 18:04:48 +0000
82+++ src/qml/dialer-app.qml 2015-05-15 18:04:48 +0000
83@@ -183,12 +183,13 @@
84 {"phoneToAdd": phoneNumber})
85 }
86
87- function viewContact(contactId, model) {
88- var initialPropers = {}
89- if (model) {
90- initialPropers = {"contactId": contactId, "model": model}
91+ function viewContact(contact, contactListPage, model) {
92+ var initialPropers = {"model": model}
93+
94+ if (typeof(contact) == 'string') {
95+ initialPropers["contactId"] = contact
96 } else {
97- initialPropers = {"contactId": contactId}
98+ initialPropers["contact"] = contact
99 }
100 pageStackNormalMode.push(Qt.resolvedUrl("ContactViewPage/DialerContactViewPage.qml"),
101 initialPropers)
102@@ -196,11 +197,9 @@
103
104 function addPhoneToContact(contact, phoneNumber, contactListPage, model) {
105 var initialPropers = {"addPhoneToContact": phoneNumber,
106- "contactListPage": contactListPage}
107+ "contactListPage": contactListPage,
108+ "model": model }
109
110- if (model) {
111- initialPropers["model"] = model
112- }
113 if (typeof(contact) == 'string') {
114 initialPropers["contactId"] = contact
115 } else {
116
117=== modified file 'tests/autopilot/dialer_app/__init__.py'
118--- tests/autopilot/dialer_app/__init__.py 2015-05-15 18:04:48 +0000
119+++ tests/autopilot/dialer_app/__init__.py 2015-05-15 18:04:48 +0000
120@@ -275,12 +275,7 @@
121 self.pointing_device.click_object(contact_delegate)
122
123 def open_contact(self, index):
124- contact_delegate = self._get_contact_delegate(index)
125- self.pointing_device.click_object(contact_delegate)
126- contact_delegate.state.wait_for('expanded')
127- details_button = contact_delegate.wait_select_single(
128- objectName='infoIcon')
129- self.pointing_device.click_object(details_button)
130+ self.click_contact(index)
131 return self.get_root_instance().select_single(
132 DialerContactViewPage, objectName='contactViewPage')
133

Subscribers

People subscribed via source and target branches