mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-02-07 14:18:25 +00:00
Clear mutable observers to avoid display issues when cell are recycled
This commit is contained in:
parent
4fb127c135
commit
5f7b4f3bcd
1 changed files with 3 additions and 0 deletions
|
|
@ -42,11 +42,13 @@ class VoipGridParticipantCell: UICollectionViewCell {
|
|||
var participantData: ConferenceParticipantDeviceData? = nil {
|
||||
didSet {
|
||||
if let data = participantData {
|
||||
data.isInConference.clearObservers()
|
||||
data.isInConference.readCurrentAndObserve { (isIn) in
|
||||
self.updateBackground()
|
||||
self.pause.isHidden = isIn == true
|
||||
self.pauseLabel.isHidden = self.pause.isHidden
|
||||
}
|
||||
data.videoEnabled.clearObservers()
|
||||
data.videoEnabled.readCurrentAndObserve { (videoEnabled) in
|
||||
self.updateBackground()
|
||||
if (videoEnabled == true) {
|
||||
|
|
@ -67,6 +69,7 @@ class VoipGridParticipantCell: UICollectionViewCell {
|
|||
self.displayName.text = displayName
|
||||
}
|
||||
}
|
||||
data.activeSpeaker.clearObservers()
|
||||
data.activeSpeaker.readCurrentAndObserve { (active) in
|
||||
if (active == true) {
|
||||
self.layer.borderWidth = 2
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue