mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-29 07:03:08 +00:00
e telepathyHelper for calling
This commit is contained in:
parent
b4823d8c7b
commit
0ec05d6687
1 changed files with 14 additions and 2 deletions
|
|
@ -64,8 +64,20 @@ Item {
|
|||
//BEGIN FUNCTIONS
|
||||
function call(number) {
|
||||
if (!callManager.foregroundCall) {
|
||||
console.log("Calling: " + providerId + " " + number);
|
||||
callManager.startCall(number, providerId);
|
||||
var account = null;
|
||||
if (telepathyHelper.activeAccounts.length > 0) {
|
||||
account = telepathyHelper.activeAccounts[0];
|
||||
} else {
|
||||
// if no account is active, use any account that can make emergency calls
|
||||
for (var i in telepathyHelper.accounts) {
|
||||
if (telepathyHelper.accounts[i].emergencyCallsAvailable) {
|
||||
account = telepathyHelper.accounts[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
console.log("Calling: " + number + " " + account.accountId);
|
||||
callManager.startCall(number, account.accountId);
|
||||
|
||||
} else {
|
||||
console.log("Hanging up: " + callManager.foregroundCall.phoneNumber);
|
||||
|
|
|
|||
Loading…
Reference in a new issue