From c5834e218cc9c10ed892e370a74d7119ae02fd1a Mon Sep 17 00:00:00 2001 From: Martin Klapetek Date: Mon, 29 Jun 2015 18:41:47 +0200 Subject: [PATCH] [dialer] Small fixes to make the call duration counter show up correctly --- dialer/package/contents/ui/Call/CallPage.qml | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/dialer/package/contents/ui/Call/CallPage.qml b/dialer/package/contents/ui/Call/CallPage.qml index db742f90..417855e2 100644 --- a/dialer/package/contents/ui/Call/CallPage.qml +++ b/dialer/package/contents/ui/Call/CallPage.qml @@ -33,7 +33,6 @@ Item { property string providerId: ofonoWrapper.providerId function secondsToTimeString(seconds) { - seconds = Math.floor(seconds/1000) var h = Math.floor(seconds / 3600); var m = Math.floor((seconds - (h * 3600)) / 60); var s = seconds - h * 3600 - m * 60; @@ -117,13 +116,10 @@ Item { horizontalAlignment: Qt.AlignHCenter verticalAlignment: Qt.AlignVCenter text: { - if (!ofonoWrapper.hasActiveCall) { - return ''; - //STATUS_DIALING - } else if (dialerUtils.status == "dialing") { + if (dialerUtils.callState == "dialing") { return i18n("Calling..."); - } else if (dialerUtils.duration > 0) { - return secondsToTimeString(ofonoWrapper.duration); + } else if (dialerUtils.callDuration > 0) { + return secondsToTimeString(dialerUtils.callDuration); } else { return ''; }