Set appropriate visibility of Conference layout

This commit is contained in:
Christophe Deschamps 2022-05-11 15:14:58 +02:00
parent d0d3f2e403
commit 137eb6de29
3 changed files with 4 additions and 13 deletions

View file

@ -122,8 +122,9 @@ import linphonesw
self.currentCallView!.isHidden = true
self.extraButtonsView.isHidden = true
self.conferencePausedView?.isHidden = true
self.conferenceGridView!.isHidden = false
self.conferenceActiveSpeakerView?.isHidden = true
let conferenceMode = ConferenceViewModel.shared.conferenceDisplayMode.value
self.conferenceGridView!.isHidden = conferenceMode != .Grid
self.conferenceActiveSpeakerView?.isHidden = conferenceMode != .ActiveSpeaker
self.conferenceGridView?.conferenceViewModel = ConferenceViewModel.shared
} else {
self.conferenceGridView?.isHidden = true

View file

@ -219,11 +219,6 @@ class VoipConferenceActiveSpeakerView: UIView, UICollectionViewDataSource, UICol
// UICollectionView related delegates
func collectionView(_ collectionView: UICollectionView, didEndDisplaying cell: UICollectionViewCell, forItemAt indexPath: IndexPath) {
let gcell = (cell as! VoipActiveSpeakerParticipantCell)
gcell.participantData?.participantDevice.nativeVideoWindowId = nil
gcell.participantData?.clearObservers()
}
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumInteritemSpacingForSectionAt section: Int) -> CGFloat {
return inter_cell

View file

@ -151,7 +151,7 @@ class VoipConferenceGridView: UIView, UICollectionViewDataSource, UICollectionVi
}
ControlsViewModel.shared.fullScreenMode.observe { (fullScreen) in
if (self.isHidden) {
if (self.isHidden || self.conferenceViewModel?.conference.value?.call?.params?.conferenceVideoLayout != .Grid) {
return
}
self.gridContainer.removeConstraints().done()
@ -189,11 +189,6 @@ class VoipConferenceGridView: UIView, UICollectionViewDataSource, UICollectionVi
}
}
func collectionView(_ collectionView: UICollectionView, didEndDisplaying cell: UICollectionViewCell, forItemAt indexPath: IndexPath) {
let gcell = (cell as! VoipGridParticipantCell)
gcell.participantData?.participantDevice.nativeVideoWindowId = nil
gcell.participantData?.clearObservers()
}
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumInteritemSpacingForSectionAt section: Int) -> CGFloat {
return inter_cell