mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-29 15:03:09 +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
|
//BEGIN FUNCTIONS
|
||||||
function call(number) {
|
function call(number) {
|
||||||
if (!callManager.foregroundCall) {
|
if (!callManager.foregroundCall) {
|
||||||
console.log("Calling: " + providerId + " " + number);
|
var account = null;
|
||||||
callManager.startCall(number, providerId);
|
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 {
|
} else {
|
||||||
console.log("Hanging up: " + callManager.foregroundCall.phoneNumber);
|
console.log("Hanging up: " + callManager.foregroundCall.phoneNumber);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue