Skip to content
Snippets Groups Projects
Unverified Commit c5f7584d authored by Sébastien Blin's avatar Sébastien Blin
Browse files

calladapter: setActiveParticipant accepts URI

Change-Id: I7de33f90ff291979808b568183e57ab551210942
parent a7378554
Branches
Tags
No related merge requests found
...@@ -548,28 +548,21 @@ CallAdapter::maximizeParticipant(const QString& uri, bool isActive) ...@@ -548,28 +548,21 @@ CallAdapter::maximizeParticipant(const QString& uri, bool isActive)
const auto conversation = convModel->getConversationForUID(LRCInstance::getCurrentConvUid()); const auto conversation = convModel->getConversationForUID(LRCInstance::getCurrentConvUid());
const auto confId = conversation.confId; 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 { try {
const auto call = callModel->getCall(confId); const auto call = callModel->getCall(confId);
switch (call.layout) { switch (call.layout) {
case lrc::api::call::Layout::GRID: case lrc::api::call::Layout::GRID:
callModel->setActiveParticipant(confId, callId); callModel->setActiveParticipant(confId, uri);
callModel->setConferenceLayout(confId, lrc::api::call::Layout::ONE_WITH_SMALL); callModel->setConferenceLayout(confId, lrc::api::call::Layout::ONE_WITH_SMALL);
break; break;
case lrc::api::call::Layout::ONE_WITH_SMALL: case lrc::api::call::Layout::ONE_WITH_SMALL:
callModel->setActiveParticipant(confId, callId); callModel->setActiveParticipant(confId, uri);
callModel->setConferenceLayout(confId, callModel->setConferenceLayout(confId,
isActive ? lrc::api::call::Layout::ONE isActive ? lrc::api::call::Layout::ONE
: lrc::api::call::Layout::ONE_WITH_SMALL); : lrc::api::call::Layout::ONE_WITH_SMALL);
break; break;
case lrc::api::call::Layout::ONE: case lrc::api::call::Layout::ONE:
callModel->setActiveParticipant(confId, callId); callModel->setActiveParticipant(confId, uri);
callModel->setConferenceLayout(confId, lrc::api::call::Layout::GRID); callModel->setConferenceLayout(confId, lrc::api::call::Layout::GRID);
break; break;
}; };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment