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

participantsoverlay: avoid freeze and async load

Change-Id: I54d7a5c413cf8c1fa5b43ea1f0f03b4ee9fbaf12
GitLab: #476
parent 05f38852
No related branches found
No related tags found
No related merge requests found
......@@ -478,8 +478,7 @@ CallAdapter::onShowIncomingCallView(const QString& accountId, const QString& con
void
CallAdapter::onShowCallView(const QString& accountId, const QString& convUid)
{
updateCall(convUid, accountId);
Q_EMIT lrcInstance_->conversationUpdated(convUid, accountId);
Q_EMIT lrcInstance_->conversationUpdated(convUid, accountId); // This will show the call
}
void
......@@ -489,8 +488,7 @@ CallAdapter::updateCall(const QString& convUid, const QString& accountId, bool f
return;
accountId_ = accountId.isEmpty() ? accountId_ : accountId;
const auto& convInfo = lrcInstance_->getConversationFromConvUid(
lrcInstance_->get_selectedConvUid());
const auto& convInfo = lrcInstance_->getConversationFromConvUid(convUid);
if (convInfo.uid.isEmpty()) {
return;
}
......
......@@ -192,7 +192,16 @@ Item {
model: GenericParticipantsFilterModel
delegate: Loader {
sourceComponent: callVideoMedia
visible: inLine ? index >= genericParticipantsRect.currentPos && index < genericParticipantsRect.currentPos + genericParticipantsRect.showable : true
active: root.visible
asynchronous: true
visible: {
if (status !== Loader.Ready)
return false
if (inLine)
return index >= genericParticipantsRect.currentPos
&& index < genericParticipantsRect.currentPos + genericParticipantsRect.showable
return true
}
width: {
var lastLine = commonParticipants.count % commonParticipantsFlow.columns
var horComponents = ((commonParticipants.count - index) > lastLine || index < 0) ? commonParticipantsFlow.columns : lastLine
......@@ -244,7 +253,11 @@ Item {
model: ActiveParticipantsFilterModel
delegate: Loader {
active: root.visible
asynchronous: true
sourceComponent: callVideoMedia
visible: status == Loader.Ready
width: Math.ceil(activeParticipantsFlow.width / activeParticipantsFlow.columns) - activeParticipantsFlow.columnsSpacing
height: Math.ceil(activeParticipantsFlow.height / activeParticipantsFlow.rows) - activeParticipantsFlow.rowsSpacing
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment