Merge lp:~tiagosh/dialer-app/fix-1224082 into lp:dialer-app

Proposed by Tiago Salem Herrmann
Status: Merged
Approved by: Gustavo Pichorim Boiko
Approved revision: 43
Merged at revision: 41
Proposed branch: lp:~tiagosh/dialer-app/fix-1224082
Merge into: lp:dialer-app
Diff against target: 103 lines (+18/-34)
3 files modified
src/qml/LiveCallPage/LiveCall.qml (+1/-0)
src/qml/VoicemailPage/VoicemailPage.qml (+1/-21)
src/qml/dialer-app.qml (+16/-13)
To merge this branch: bzr merge lp:~tiagosh/dialer-app/fix-1224082
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve
Gustavo Pichorim Boiko (community) Approve
Review via email: mp+186435@code.launchpad.net

Commit message

- do not switch to call log view on incoming calls.
- change the logic of creating/destroying live call and voicemail views.

Description of the change

- do not switch to call log view on incoming calls.
- change the logic of creating/destroying live call and voicemail views.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
lp:~tiagosh/dialer-app/fix-1224082 updated
42. By Tiago Salem Herrmann

also track calls using onForegroundCallChanged.
switch to call log when view is destroyed

43. By Tiago Salem Herrmann

use only foregroundcalls to track calls on the app

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

Looks good and works as expected!

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
=== modified file 'src/qml/LiveCallPage/LiveCall.qml'
--- src/qml/LiveCallPage/LiveCall.qml 2013-08-29 17:24:15 +0000
+++ src/qml/LiveCallPage/LiveCall.qml 2013-09-18 21:27:36 +0000
@@ -36,6 +36,7 @@
36 property bool isMuted: call ? call.muted : false36 property bool isMuted: call ? call.muted : false
37 property bool dtmfVisible: false37 property bool dtmfVisible: false
38 property string phoneNumberSubTypeLabel: ""38 property string phoneNumberSubTypeLabel: ""
39 Component.onDestruction: mainView.switchToCallLogView()
3940
40 // TRANSLATORS: %1 is the duration of the call41 // TRANSLATORS: %1 is the duration of the call
41 title: contactWatcher.alias != "" ? contactWatcher.alias : contactWatcher.phoneNumber42 title: contactWatcher.alias != "" ? contactWatcher.alias : contactWatcher.phoneNumber
4243
=== modified file 'src/qml/VoicemailPage/VoicemailPage.qml'
--- src/qml/VoicemailPage/VoicemailPage.qml 2013-07-24 19:30:24 +0000
+++ src/qml/VoicemailPage/VoicemailPage.qml 2013-09-18 21:27:36 +0000
@@ -27,18 +27,10 @@
27 property variant contact27 property variant contact
28 property QtObject call: callManager.foregroundCall28 property QtObject call: callManager.foregroundCall
29 property string number: callManager.voicemailNumber29 property string number: callManager.voicemailNumber
30 Component.onDestruction: mainView.switchToCallLogView()
3031
31 title: i18n.tr("Voicemail")32 title: i18n.tr("Voicemail")
3233
33 Component.onDestruction: {
34 // if this view was destroyed but we still have
35 // active calls, then it means it was manually removed
36 // from the stack
37 if (previousTab != -1 && callManager.hasCalls) {
38 mainView.selectedTabIndex = previousTab
39 }
40 }
41
42 function isVoicemailActive() {34 function isVoicemailActive() {
43 return mainView.isVoicemailActive();35 return mainView.isVoicemailActive();
44 }36 }
@@ -49,18 +41,6 @@
49 }41 }
50 }42 }
5143
52 Connections {
53 target: callManager
54 onCallEnded: {
55 if (!callManager.hasCalls) {
56 if (voicemail.visible && voicemail.previousTab != -1) {
57 mainView.selectedTabIndex = voicemail.previousTab
58 }
59 mainView.endCall();
60 }
61 }
62 }
63
64 Item {44 Item {
65 id: container45 id: container
6646
6747
=== modified file 'src/qml/dialer-app.qml'
--- src/qml/dialer-app.qml 2013-08-26 14:34:56 +0000
+++ src/qml/dialer-app.qml 2013-09-18 21:27:36 +0000
@@ -46,6 +46,9 @@
46 callManager.startCall(number);46 callManager.startCall(number);
47 }47 }
4848
49 function switchToCallLogView() {
50 pageStack.currentPage.currentTab = 2;
51 }
4952
50 function isVoicemailActive() {53 function isVoicemailActive() {
51 if (callManager.foregroundCall) {54 if (callManager.foregroundCall) {
@@ -70,22 +73,22 @@
70 Connections {73 Connections {
71 target: callManager74 target: callManager
72 onForegroundCallChanged: {75 onForegroundCallChanged: {
73 // if there is no call, or if the views are already loaded, do not continue processing76 if(!callManager.hasCalls) {
74 if (!callManager.foregroundCall) {
75 while (pageStack.depth > 1) {77 while (pageStack.depth > 1) {
76 pageStack.pop();78 pageStack.pop();
77 }79 }
78 pageStack.currentPage.currentTab = 2;80 return
79 return;81 }
80 }82 // if there are no calls, or if the views are already loaded, do not continue processing
8183 if ((callManager.foregroundCall || callManager.backgroundCall) && pageStack.depth === 1) {
82 if (callManager.foregroundCall.voicemail) {84 if ((callManager.foregroundCall && callManager.foregroundCall.voicemail)
83 pageStack.push(Qt.resolvedUrl("VoicemailPage/VoicemailPage.qml"))85 || (callManager.backgroundCall && callManager.backgroundCall.voicemail)) {
84 } else {86 pageStack.push(Qt.resolvedUrl("VoicemailPage/VoicemailPage.qml"))
85 pageStack.push(Qt.resolvedUrl("LiveCallPage/LiveCall.qml"));87 } else {
86 }88 pageStack.push(Qt.resolvedUrl("LiveCallPage/LiveCall.qml"));
8789 }
88 application.activateWindow();90 application.activateWindow();
91 }
89 }92 }
90 }93 }
9194

Subscribers

People subscribed via source and target branches