mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-29 15:03:09 +00:00
[dialer] Small fixes to make the call duration counter show up correctly
This commit is contained in:
parent
b7b6691c19
commit
c5834e218c
1 changed files with 3 additions and 7 deletions
|
|
@ -33,7 +33,6 @@ Item {
|
||||||
property string providerId: ofonoWrapper.providerId
|
property string providerId: ofonoWrapper.providerId
|
||||||
|
|
||||||
function secondsToTimeString(seconds) {
|
function secondsToTimeString(seconds) {
|
||||||
seconds = Math.floor(seconds/1000)
|
|
||||||
var h = Math.floor(seconds / 3600);
|
var h = Math.floor(seconds / 3600);
|
||||||
var m = Math.floor((seconds - (h * 3600)) / 60);
|
var m = Math.floor((seconds - (h * 3600)) / 60);
|
||||||
var s = seconds - h * 3600 - m * 60;
|
var s = seconds - h * 3600 - m * 60;
|
||||||
|
|
@ -117,13 +116,10 @@ Item {
|
||||||
horizontalAlignment: Qt.AlignHCenter
|
horizontalAlignment: Qt.AlignHCenter
|
||||||
verticalAlignment: Qt.AlignVCenter
|
verticalAlignment: Qt.AlignVCenter
|
||||||
text: {
|
text: {
|
||||||
if (!ofonoWrapper.hasActiveCall) {
|
if (dialerUtils.callState == "dialing") {
|
||||||
return '';
|
|
||||||
//STATUS_DIALING
|
|
||||||
} else if (dialerUtils.status == "dialing") {
|
|
||||||
return i18n("Calling...");
|
return i18n("Calling...");
|
||||||
} else if (dialerUtils.duration > 0) {
|
} else if (dialerUtils.callDuration > 0) {
|
||||||
return secondsToTimeString(ofonoWrapper.duration);
|
return secondsToTimeString(dialerUtils.callDuration);
|
||||||
} else {
|
} else {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue