Commit 9304442b authored by Ronan Abhamon's avatar Ronan Abhamon

feat(src/components/call/CallModel): display calls window only when a call is...

feat(src/components/call/CallModel): display calls window only when a call is accepted or is outgoing
parent 17877a85
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
#include <QDateTime> #include <QDateTime>
#include <QtDebug> #include <QtDebug>
#include "../../app/App.hpp"
#include "../../app/Paths.hpp" #include "../../app/Paths.hpp"
#include "../../utils.hpp" #include "../../utils.hpp"
#include "../core/CoreManager.hpp" #include "../core/CoreManager.hpp"
...@@ -101,6 +102,7 @@ void CallModel::accept () { ...@@ -101,6 +102,7 @@ void CallModel::accept () {
params->enableVideo(false); params->enableVideo(false);
setRecordFile(params); setRecordFile(params);
App::getInstance()->getCallsWindow()->show();
core->acceptCallWithParams(m_linphone_call, params); core->acceptCallWithParams(m_linphone_call, params);
} }
...@@ -110,6 +112,7 @@ void CallModel::acceptWithVideo () { ...@@ -110,6 +112,7 @@ void CallModel::acceptWithVideo () {
params->enableVideo(true); params->enableVideo(true);
setRecordFile(params); setRecordFile(params);
App::getInstance()->getCallsWindow()->show();
core->acceptCallWithParams(m_linphone_call, params); core->acceptCallWithParams(m_linphone_call, params);
} }
......
...@@ -147,7 +147,8 @@ bool CallsListModel::removeRows (int row, int count, const QModelIndex &parent) ...@@ -147,7 +147,8 @@ bool CallsListModel::removeRows (int row, int count, const QModelIndex &parent)
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
void CallsListModel::addCall (const shared_ptr<linphone::Call> &linphone_call) { void CallsListModel::addCall (const shared_ptr<linphone::Call> &linphone_call) {
App::getInstance()->getCallsWindow()->show(); if (linphone_call->getDir() == linphone::CallDirOutgoing)
App::getInstance()->getCallsWindow()->show();
CallModel *call = new CallModel(linphone_call); CallModel *call = new CallModel(linphone_call);
......
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