Commit 81083553 authored by Andreas Traczyk's avatar Andreas Traczyk

calls: fix hangup button not working for call from pending contact

Change-Id: Idebb5a3bf046f0ec3ac285d44d55d5518806e15d
parent dc17c81b
......@@ -113,13 +113,13 @@ VideoOverlay::getShowChatView()
void
VideoOverlay::on_hangupButton_clicked()
{
auto selectedConvUid = LRCInstance::getSelectedConvUid();
auto conversation = Utils::getConversationFromUid(selectedConvUid,
*LRCInstance::getCurrentConversationModel());
auto& callId = conversation->callId;
auto callModel = LRCInstance::getCurrentCallModel();
if (callModel->hasCall(callId)) {
callModel->hangUp(callId);
auto convInfo = Utils::getSelectedConversation();
if (!convInfo.uid.empty()) {
auto& callId = convInfo.callId;
auto callModel = LRCInstance::getCurrentCallModel();
if (callModel->hasCall(callId)) {
callModel->hangUp(callId);
}
}
ui->chatButton->setChecked(false);
}
......
Markdown is supported
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