From 8d873e496d331855facdb9a3554930d136f1b9ce Mon Sep 17 00:00:00 2001 From: Christophe Deschamps Date: Tue, 10 Jan 2023 16:02:37 +0100 Subject: [PATCH] Fix second particpant joining --- .../Conference/VoipConferenceActiveSpeakerView.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Classes/Swift/Voip/Views/Fragments/Conference/VoipConferenceActiveSpeakerView.swift b/Classes/Swift/Voip/Views/Fragments/Conference/VoipConferenceActiveSpeakerView.swift index cd5d33e6f..b21a3af4b 100644 --- a/Classes/Swift/Voip/Views/Fragments/Conference/VoipConferenceActiveSpeakerView.swift +++ b/Classes/Swift/Voip/Views/Fragments/Conference/VoipConferenceActiveSpeakerView.swift @@ -102,7 +102,7 @@ class VoipConferenceActiveSpeakerView: UIView, UICollectionViewDataSource, UICol } } } else if (otherSpeakersCount == 1) { - if let data = model.activeSpeakerConferenceParticipantDevices.value!.first { + if let data = model.conferenceParticipantDevices.value!.last { data.videoEnabled.readCurrentAndObserve { video in self.fillActiveSpeakerSpace(data: data,video: video == true) } @@ -399,7 +399,7 @@ class VoipConferenceActiveSpeakerView: UIView, UICollectionViewDataSource, UICol meGrid.removeConstraints().done() activeSpeakerView.removeConstraints().done() activeSpeakerAvatar.removeConstraints().done() - let otherParticipantsCount = (conferenceViewModel?.conferenceParticipantDevices.value!.count ?? 0) - 1 + var otherParticipantsCount = (conferenceViewModel?.conferenceParticipantDevices.value!.count ?? 0) > 0 ? conferenceViewModel!.conferenceParticipantDevices.value!.count - 1 : 0 if ([.landscapeLeft, .landscapeRight].contains( UIDevice.current.orientation)) { if (otherParticipantsCount == 0) { activeSpeakerView.matchParentDimmensions().done()