mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-28 14:43: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
|
||||
|
||||
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 '';
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue