mirror of
https://git.jami.net/savoirfairelinux/jami-client-qt.git
synced 2025-04-21 21:52:03 +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_);
|
||||
updateCallOverlay(convInfo);
|
||||
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
|
||||
|
@ -457,9 +462,7 @@ CallAdapter::connectCallModel(const QString& accountId)
|
|||
if (!convInfo.uid.isEmpty() && convInfo.uid == LRCInstance::getCurrentConvUid()) {
|
||||
accInfo.conversationModel->selectConversation(convInfo.uid);
|
||||
}
|
||||
LRCInstance::renderer()->addDistantRenderer(callId);
|
||||
updateCall(convInfo.uid, accountId);
|
||||
LRCInstance::getAccountInfo(accountId).callModel->setCurrentCall(callId);
|
||||
break;
|
||||
}
|
||||
case lrc::api::call::Status::PAUSED:
|
||||
|
|
|
@ -70,6 +70,9 @@ public:
|
|||
Q_INVOKABLE void muteParticipant(const QString& uri, const bool state);
|
||||
Q_INVOKABLE bool isMuted(const QString& uri) const;
|
||||
Q_INVOKABLE void hangupParticipant(const QString& uri);
|
||||
Q_INVOKABLE void updateCall(const QString& convUid = {},
|
||||
const QString& accountId = {},
|
||||
bool forceCallOnly = false);
|
||||
|
||||
signals:
|
||||
void callStatusChanged(int index, const QString& accountId, const QString& convUid);
|
||||
|
@ -101,9 +104,6 @@ public slots:
|
|||
void slotAccountChanged();
|
||||
|
||||
private:
|
||||
void updateCall(const QString& convUid = {},
|
||||
const QString& accountId = {},
|
||||
bool forceCallOnly = false);
|
||||
bool shouldShowPreview(bool force);
|
||||
void showNotification(const QString& accountId, const QString& convUid);
|
||||
|
||||
|
|
|
@ -148,6 +148,7 @@ Window {
|
|||
AccountAdapter.currentAccountId)
|
||||
ConversationsAdapter.selectConversation(
|
||||
AccountAdapter.currentAccountId, callConv)
|
||||
CallAdapter.updateCall(callConv, currentAccountId)
|
||||
} else {
|
||||
showWelcomeView()
|
||||
}
|
||||
|
|
|
@ -269,6 +269,14 @@ RenderManager::addDistantRenderer(const QString& id)
|
|||
* Connect FrameWrapper to avmodel.
|
||||
*/
|
||||
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.
|
||||
|
|
|
@ -89,7 +89,7 @@ signals:
|
|||
*/
|
||||
void renderingStopped(const QString& id);
|
||||
|
||||
private slots:
|
||||
public slots:
|
||||
/*
|
||||
* Used to listen to AVModel::rendererStarted.
|
||||
* @param id of the renderer
|
||||
|
|
Loading…
Add table
Reference in a new issue