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 @@
#include <QDateTime>
#include <QtDebug>
#include "../../app/App.hpp"
#include "../../app/Paths.hpp"
#include "../../utils.hpp"
#include "../core/CoreManager.hpp"
......@@ -101,6 +102,7 @@ void CallModel::accept () {
params->enableVideo(false);
setRecordFile(params);
App::getInstance()->getCallsWindow()->show();
core->acceptCallWithParams(m_linphone_call, params);
}
......@@ -110,6 +112,7 @@ void CallModel::acceptWithVideo () {
params->enableVideo(true);
setRecordFile(params);
App::getInstance()->getCallsWindow()->show();
core->acceptCallWithParams(m_linphone_call, params);
}
......
......@@ -147,7 +147,8 @@ bool CallsListModel::removeRows (int row, int count, const QModelIndex &parent)
// -----------------------------------------------------------------------------
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);
......
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