1
0
Fork 0
mirror of https://git.jami.net/savoirfairelinux/jami-client-qt.git synced 2025-09-10 12:03:18 +02:00

call: use callAdapter updateCall when setting up main view

It is to make sure that all other call related UI will be
set up correctly.

Gitlab: #298
Change-Id: Iabc1587e0c0622cc6b9c0fecd99bfd35b156fcf7
This commit is contained in:
Ming Rui Zhang 2021-03-02 12:05:40 -05:00 committed by Andreas Traczyk
parent b296a02e47
commit 3f8f1f1e25
4 changed files with 7 additions and 12 deletions

View file

@ -207,7 +207,9 @@ CallAdapter::onShowCallView(const QString& accountId, const QString& convUid)
if (convInfo.uid.isEmpty()) {
return;
}
updateCall(convInfo.uid, accountId);
emit callSetupMainViewRequired(accountId, convInfo.uid);
}
void
@ -226,7 +228,6 @@ CallAdapter::updateCall(const QString& convUid, const QString& accountId, bool f
return;
}
emit callSetupMainViewRequired(accountId_, convUid_);
updateCallOverlay(convInfo);
emit previewVisibilityNeedToChange(shouldShowPreview(forceCallOnly));
@ -423,11 +424,14 @@ CallAdapter::connectCallModel(const QString& accountId)
/*
* Reset the call view corresponding accountId, uid.
*/
lrcInstance_->setSelectedConvId(otherConv.uid);
updateCall(otherConv.uid, otherConv.accountId, forceCallOnly);
emit callSetupMainViewRequired(accountId, convInfo.uid);
}
}
}
return;
}
preventScreenSaver(false);
break;

View file

@ -200,7 +200,7 @@ Rectangle {
currentConvUID = currentUID
if (callState === Call.Status.IN_PROGRESS || callState === Call.Status.PAUSED) {
UtilsAdapter.setCurrentCall(AccountAdapter.currentAccountId, currentUID)
CallAdapter.updateCall(currentUID, AccountAdapter.currentAccountId)
if (isAudioOnly)
callStackView.showAudioCallPage()
else

View file

@ -189,14 +189,6 @@ UtilsAdapter::getAccountListSize()
return getCurrAccList().size();
}
void
UtilsAdapter::setCurrentCall(const QString& accountId, const QString& convUid)
{
auto& accInfo = lrcInstance_->getAccountInfo(accountId);
auto const& convInfo = lrcInstance_->getConversationFromConvUid(convUid, accountId);
accInfo.callModel->setCurrentCall(convInfo.callId);
}
bool
UtilsAdapter::hasCall(const QString& accountId)
{

View file

@ -58,7 +58,6 @@ public:
Q_INVOKABLE void makePermanentCurrentConv();
Q_INVOKABLE const QStringList getCurrAccList();
Q_INVOKABLE int getAccountListSize();
Q_INVOKABLE void setCurrentCall(const QString& accountId, const QString& convUid);
Q_INVOKABLE bool hasCall(const QString& accountId);
Q_INVOKABLE const QString getCallConvForAccount(const QString& accountId);
Q_INVOKABLE const QString getCallId(const QString& accountId, const QString& convUid);