1
0
Fork 0
mirror of https://git.jami.net/savoirfairelinux/jami-client-qt.git synced 2025-07-14 20:45:23 +02:00

calladapter: setActiveParticipant accepts URI

Change-Id: I7de33f90ff291979808b568183e57ab551210942
This commit is contained in:
Sébastien Blin 2020-09-25 16:40:33 -04:00
parent a737855426
commit c5f7584d0a
No known key found for this signature in database
GPG key ID: C894BB01EEB2A9A9

View file

@ -548,28 +548,21 @@ CallAdapter::maximizeParticipant(const QString& uri, bool isActive)
const auto conversation = convModel->getConversationForUID(LRCInstance::getCurrentConvUid());
const auto confId = conversation.confId;
QString callId;
if (LRCInstance::getCurrentAccountInfo().profileInfo.uri != uri) {
const auto convInfo = LRCInstance::getConversationFromPeerUri(uri, accountId_);
if (!convInfo.uid.isEmpty()) {
callId = convInfo.callId;
}
}
try {
const auto call = callModel->getCall(confId);
switch (call.layout) {
case lrc::api::call::Layout::GRID:
callModel->setActiveParticipant(confId, callId);
callModel->setActiveParticipant(confId, uri);
callModel->setConferenceLayout(confId, lrc::api::call::Layout::ONE_WITH_SMALL);
break;
case lrc::api::call::Layout::ONE_WITH_SMALL:
callModel->setActiveParticipant(confId, callId);
callModel->setActiveParticipant(confId, uri);
callModel->setConferenceLayout(confId,
isActive ? lrc::api::call::Layout::ONE
: lrc::api::call::Layout::ONE_WITH_SMALL);
break;
case lrc::api::call::Layout::ONE:
callModel->setActiveParticipant(confId, callId);
callModel->setActiveParticipant(confId, uri);
callModel->setConferenceLayout(confId, lrc::api::call::Layout::GRID);
break;
};