Commit 69144b0b authored by Bhushan Shah's avatar Bhushan Shah 📱
Browse files

dialer: use the number directly instead of checking contactManager

There's existing todo item to make it use the kpeople instead of
telepathy contact manager, no need to deal with telepathy contact
manager, in some setups it causes crasher.

See: !22
parent 2a11f0ba
...@@ -55,21 +55,13 @@ DialerUtils::~DialerUtils() ...@@ -55,21 +55,13 @@ DialerUtils::~DialerUtils()
void DialerUtils::dial(const QString &number) void DialerUtils::dial(const QString &number)
{ {
// FIXME: this should be replaced by kpeople thing // FIXME: this should be replaced by kpeople thing
auto pendingContact = m_simAccount->connection()->contactManager()->contactsForIdentifiers(QStringList() << number); qDebug() << "Starting call...";
Tp::PendingChannelRequest *pendingChannel = m_simAccount->ensureAudioCall(number);
connect(pendingContact, &Tp::PendingOperation::finished, [=](){ connect(pendingChannel, &Tp::PendingChannelRequest::finished, [=](){
if (pendingContact->contacts().size() < 1) { if (pendingChannel->isError()) {
qWarning() << " no contacts"; qWarning() << "Error when requesting channel" << pendingChannel->errorMessage();
return; setCallState("failed");
} }
qDebug() << "Starting call...";
Tp::PendingChannelRequest *pendingChannel = m_simAccount->ensureAudioCall(pendingContact->contacts().first());
connect(pendingChannel, &Tp::PendingChannelRequest::finished, [=](){
if (pendingChannel->isError()) {
qWarning() << "Error when requesting channel" << pendingChannel->errorMessage();
setCallState("failed");
}
});
}); });
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment