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

Subscribers

People subscribed via source and target branches