Remove observers before reloading grid/as participants of a conference

This commit is contained in:
Christophe Deschamps 2022-05-12 20:35:40 +02:00
parent 9581d88f09
commit 1c8fdb1924
2 changed files with 6 additions and 0 deletions

View file

@ -90,6 +90,9 @@ class VoipConferenceActiveSpeakerView: UIView, UICollectionViewDataSource, UICol
}
func reloadData() {
conferenceViewModel?.conferenceParticipantDevices.value?.forEach {
$0.clearObservers()
}
self.grid.reloadData()
}

View file

@ -174,6 +174,9 @@ class VoipConferenceGridView: UIView, UICollectionViewDataSource, UICollectionVi
// UICollectionView related delegates
func reloadData() {
conferenceViewModel?.conferenceParticipantDevices.value?.forEach {
$0.clearObservers()
}
if (self.isHidden || conferenceViewModel?.conference.value?.call?.params?.conferenceVideoLayout != .Grid) {
self.grid.reloadData()
return