mirror of
https://git.jami.net/savoirfairelinux/jami-client-qt.git
synced 2025-04-23 06:32:02 +02:00
calladapter: initialize auto answer calls for non-current accounts
Gitlab: #193 Change-Id: I9ab1c298a1f720165affa55c0350bb27dfd67030
This commit is contained in:
parent
3ade8ee12f
commit
4cbfe7a966
5 changed files with 18 additions and 6 deletions
|
@ -227,6 +227,11 @@ CallAdapter::updateCall(const QString& convUid, const QString& accountId, bool f
|
||||||
emit callSetupMainViewRequired(accountId_, convUid_);
|
emit callSetupMainViewRequired(accountId_, convUid_);
|
||||||
updateCallOverlay(convInfo);
|
updateCallOverlay(convInfo);
|
||||||
emit previewVisibilityNeedToChange(shouldShowPreview(forceCallOnly));
|
emit previewVisibilityNeedToChange(shouldShowPreview(forceCallOnly));
|
||||||
|
|
||||||
|
if (call->status == lrc::api::call::Status::IN_PROGRESS) {
|
||||||
|
LRCInstance::renderer()->addDistantRenderer(call->id);
|
||||||
|
LRCInstance::getAccountInfo(accountId).callModel->setCurrentCall(call->id);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
|
@ -457,9 +462,7 @@ CallAdapter::connectCallModel(const QString& accountId)
|
||||||
if (!convInfo.uid.isEmpty() && convInfo.uid == LRCInstance::getCurrentConvUid()) {
|
if (!convInfo.uid.isEmpty() && convInfo.uid == LRCInstance::getCurrentConvUid()) {
|
||||||
accInfo.conversationModel->selectConversation(convInfo.uid);
|
accInfo.conversationModel->selectConversation(convInfo.uid);
|
||||||
}
|
}
|
||||||
LRCInstance::renderer()->addDistantRenderer(callId);
|
|
||||||
updateCall(convInfo.uid, accountId);
|
updateCall(convInfo.uid, accountId);
|
||||||
LRCInstance::getAccountInfo(accountId).callModel->setCurrentCall(callId);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case lrc::api::call::Status::PAUSED:
|
case lrc::api::call::Status::PAUSED:
|
||||||
|
|
|
@ -70,6 +70,9 @@ public:
|
||||||
Q_INVOKABLE void muteParticipant(const QString& uri, const bool state);
|
Q_INVOKABLE void muteParticipant(const QString& uri, const bool state);
|
||||||
Q_INVOKABLE bool isMuted(const QString& uri) const;
|
Q_INVOKABLE bool isMuted(const QString& uri) const;
|
||||||
Q_INVOKABLE void hangupParticipant(const QString& uri);
|
Q_INVOKABLE void hangupParticipant(const QString& uri);
|
||||||
|
Q_INVOKABLE void updateCall(const QString& convUid = {},
|
||||||
|
const QString& accountId = {},
|
||||||
|
bool forceCallOnly = false);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void callStatusChanged(int index, const QString& accountId, const QString& convUid);
|
void callStatusChanged(int index, const QString& accountId, const QString& convUid);
|
||||||
|
@ -101,9 +104,6 @@ public slots:
|
||||||
void slotAccountChanged();
|
void slotAccountChanged();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void updateCall(const QString& convUid = {},
|
|
||||||
const QString& accountId = {},
|
|
||||||
bool forceCallOnly = false);
|
|
||||||
bool shouldShowPreview(bool force);
|
bool shouldShowPreview(bool force);
|
||||||
void showNotification(const QString& accountId, const QString& convUid);
|
void showNotification(const QString& accountId, const QString& convUid);
|
||||||
|
|
||||||
|
|
|
@ -148,6 +148,7 @@ Window {
|
||||||
AccountAdapter.currentAccountId)
|
AccountAdapter.currentAccountId)
|
||||||
ConversationsAdapter.selectConversation(
|
ConversationsAdapter.selectConversation(
|
||||||
AccountAdapter.currentAccountId, callConv)
|
AccountAdapter.currentAccountId, callConv)
|
||||||
|
CallAdapter.updateCall(callConv, currentAccountId)
|
||||||
} else {
|
} else {
|
||||||
showWelcomeView()
|
showWelcomeView()
|
||||||
}
|
}
|
||||||
|
|
|
@ -269,6 +269,14 @@ RenderManager::addDistantRenderer(const QString& id)
|
||||||
* Connect FrameWrapper to avmodel.
|
* Connect FrameWrapper to avmodel.
|
||||||
*/
|
*/
|
||||||
dfw->connectStartRendering();
|
dfw->connectStartRendering();
|
||||||
|
try {
|
||||||
|
/*
|
||||||
|
* If the renderer has already started, then start the slot.
|
||||||
|
*/
|
||||||
|
if (avModel_.getRenderer(id).isRendering())
|
||||||
|
dfw->slotRenderingStarted(id);
|
||||||
|
} catch (...) {
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Add to map.
|
* Add to map.
|
||||||
|
|
|
@ -89,7 +89,7 @@ signals:
|
||||||
*/
|
*/
|
||||||
void renderingStopped(const QString& id);
|
void renderingStopped(const QString& id);
|
||||||
|
|
||||||
private slots:
|
public slots:
|
||||||
/*
|
/*
|
||||||
* Used to listen to AVModel::rendererStarted.
|
* Used to listen to AVModel::rendererStarted.
|
||||||
* @param id of the renderer
|
* @param id of the renderer
|
||||||
|
|
Loading…
Add table
Reference in a new issue