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

Proposed by Tiago Salem Herrmann
Status: Merged
Approved by: Gustavo Pichorim Boiko
Approved revision: 49
Merged at revision: 48
Proposed branch: lp:~tiagosh/dialer-app/fix-1218311
Merge into: lp:dialer-app
Diff against target: 87 lines (+40/-1)
4 files modified
src/qml/DialerPage/DialerPage.qml (+1/-1)
src/qml/LiveCallPage/LiveCall.qml (+12/-0)
src/qml/VoicemailPage/VoicemailPage.qml (+12/-0)
src/qml/dialer-app.qml (+15/-0)
To merge this branch: bzr merge lp:~tiagosh/dialer-app/fix-1218311
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve
Gustavo Pichorim Boiko (community) Approve
Review via email: mp+187892@code.launchpad.net

Commit message

Push views to the pagestack even before the telepathy channel is created.

Description of the change

Push views to the pagestack even before the telepathy channel is created.

This MR changes the way we create the live call views. We push it to the page stack when an user tries to call a number (from dialer-app or from other apps), and not when the telepathy channel is created.
It feels more responsive in general.

To post a comment you must log in.
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 :

23 + interval: 3000

I think we could increase that to 5 seconds or even more just to be on the safe side. Maybe we can use 10 seconds for now?

review: Needs Fixing
lp:~tiagosh/dialer-app/fix-1218311 updated
49. By Tiago Salem Herrmann

update timeout to 10 seconds

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/DialerPage/DialerPage.qml'
2--- src/qml/DialerPage/DialerPage.qml 2013-09-24 19:40:57 +0000
3+++ src/qml/DialerPage/DialerPage.qml 2013-09-26 21:39:41 +0000
4@@ -171,7 +171,7 @@
5 anchors.horizontalCenter: parent.horizontalCenter
6 onClicked: {
7 console.log("Starting a call to " + keypadEntry.value);
8- callManager.startCall(keypadEntry.value);
9+ mainView.call(keypadEntry.value);
10 keypadEntry.value = "";
11 }
12 enabled: dialNumber != "" && telepathyHelper.connected
13
14=== modified file 'src/qml/LiveCallPage/LiveCall.qml'
15--- src/qml/LiveCallPage/LiveCall.qml 2013-09-18 21:12:30 +0000
16+++ src/qml/LiveCallPage/LiveCall.qml 2013-09-26 21:39:41 +0000
17@@ -37,6 +37,18 @@
18 property bool dtmfVisible: false
19 property string phoneNumberSubTypeLabel: ""
20 Component.onDestruction: mainView.switchToCallLogView()
21+ Timer {
22+ id: callWatcher
23+ interval: 10000
24+ repeat: false
25+ running: true
26+ onTriggered: {
27+ if (!call) {
28+ // TODO: notify about failed call
29+ pageStack.pop()
30+ }
31+ }
32+ }
33
34 // TRANSLATORS: %1 is the duration of the call
35 title: contactWatcher.alias != "" ? contactWatcher.alias : contactWatcher.phoneNumber
36
37=== modified file 'src/qml/VoicemailPage/VoicemailPage.qml'
38--- src/qml/VoicemailPage/VoicemailPage.qml 2013-09-18 21:12:30 +0000
39+++ src/qml/VoicemailPage/VoicemailPage.qml 2013-09-26 21:39:41 +0000
40@@ -28,6 +28,18 @@
41 property QtObject call: callManager.foregroundCall
42 property string number: callManager.voicemailNumber
43 Component.onDestruction: mainView.switchToCallLogView()
44+ Timer {
45+ id: callWatcher
46+ interval: 10000
47+ repeat: false
48+ running: true
49+ onTriggered: {
50+ if (!call) {
51+ // TODO: notify about failed call
52+ pageStack.pop()
53+ }
54+ }
55+ }
56
57 title: i18n.tr("Voicemail")
58
59
60=== modified file 'src/qml/dialer-app.qml'
61--- src/qml/dialer-app.qml 2013-09-18 21:27:00 +0000
62+++ src/qml/dialer-app.qml 2013-09-26 21:39:41 +0000
63@@ -39,10 +39,25 @@
64 }
65
66 function callVoicemail() {
67+ if (!telepathyHelper.connected || callManager.voicemailNumber === "") {
68+ return
69+ }
70+ if (pageStack.depth === 1 && !callManager.hasCalls) {
71+ pageStack.push(Qt.resolvedUrl("VoicemailPage/VoicemailPage.qml"))
72+ }
73 callManager.startCall(callManager.voicemailNumber);
74 }
75
76 function call(number) {
77+ if (!telepathyHelper.connected) {
78+ return
79+ }
80+ if (number === callManager.voicemailNumber) {
81+ callVoicemail()
82+ }
83+ if (pageStack.depth === 1 && !callManager.hasCalls) {
84+ pageStack.push(Qt.resolvedUrl("LiveCallPage/LiveCall.qml"), {"number": number})
85+ }
86 callManager.startCall(number);
87 }
88

Subscribers

People subscribed via source and target branches