Skip to content
Snippets Groups Projects
Commit c0532c53 authored by Kateryna Kostiuk's avatar Kateryna Kostiuk
Browse files

fix conference layout

Change-Id: Ica47f7a6baffc3952356ad569302acc035b2fdff
parent c578b3fe
No related branches found
No related tags found
No related merge requests found
......@@ -239,7 +239,7 @@ CVPixelBufferRef pixelBufferPreview;
return;
}
if ([self isCurrentCall: confId]) {
[self updateConference: confId];
[self updateConference];
}
});
//monitor for updated call state
......@@ -385,8 +385,9 @@ CVPixelBufferRef pixelBufferPreview;
participantsOverlays = [[NSMutableDictionary alloc] init];
}
-(void)updateConference:(QString)confId
-(void)updateConference
{
auto confId = [self getcallID];
if (confId.isEmpty()) {
[self removeConferenceLayout];
return;
......@@ -400,6 +401,7 @@ CVPixelBufferRef pixelBufferPreview;
[self removeConferenceLayout];
return;
}
NSMutableArray* participantUrs = [[NSMutableArray alloc] init];
for (auto participant: participants) {
ConferenceParticipant conferenceParticipant;
conferenceParticipant.x = participant["x"].toFloat();
......@@ -407,6 +409,7 @@ CVPixelBufferRef pixelBufferPreview;
conferenceParticipant.width = participant["w"].toFloat();
conferenceParticipant.hight = participant["h"].toFloat();
conferenceParticipant.uri = participant["uri"].toNSString();
[participantUrs addObject:participant["uri"].toNSString()];
conferenceParticipant.active = participant["active"] == "true";
conferenceParticipant.isLocal = false;
conferenceParticipant.bestName = participant["uri"].toNSString();
......@@ -433,6 +436,13 @@ CVPixelBufferRef pixelBufferPreview;
[overlay updateViewWithParticipant: conferenceParticipant];
}
}
auto keys = [participantsOverlays allKeys];
for (auto key : keys) {
if (![participantUrs containsObject:key]) {
[participantsOverlays[key] removeFromSuperview];
participantsOverlays[key] = nil;
}
}
}
-(void) updateCall
......@@ -465,7 +475,7 @@ CVPixelBufferRef pixelBufferPreview;
[recordOnOffButton setHidden:!confUid_.isEmpty()];
[holdOnOffButton setHidden:!confUid_.isEmpty()];
[movableBaseForView setHidden:!confUid_.isEmpty()];
[self updateConference: confUid_];
[self updateConference];
[timeSpentLabel setStringValue:callModel->getFormattedCallDuration(callUid_).toNSString()];
if (refreshDurationTimer == nil)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment