diff --git a/submodules/TelegramCallsUI/Sources/VoiceChatParticipantItem.swift b/submodules/TelegramCallsUI/Sources/VoiceChatParticipantItem.swift index 0a494adf50..8da704eb55 100644 --- a/submodules/TelegramCallsUI/Sources/VoiceChatParticipantItem.swift +++ b/submodules/TelegramCallsUI/Sources/VoiceChatParticipantItem.swift @@ -169,7 +169,8 @@ class VoiceChatParticipantItemNode: ItemListRevealOptionsItemNode { private var peerPresenceManager: PeerPresenceStatusManager? private var layoutParams: (VoiceChatParticipantItem, ListViewItemLayoutParams, Bool, Bool)? - + private var wavesColor: UIColor? + init() { self.topStripeNode = ASDisplayNode() self.topStripeNode.isLayerBacked = true @@ -437,6 +438,7 @@ class VoiceChatParticipantItemNode: ItemListRevealOptionsItemNode { return (layout, { [weak self] synchronousLoad, animated in if let strongSelf = self { strongSelf.layoutParams = (item, params, first, last) + strongSelf.wavesColor = wavesColor let nonExtractedRect = CGRect(origin: CGPoint(), size: CGSize(width: layout.contentSize.width - 16.0, height: layout.contentSize.height)) let extractedRect = CGRect(origin: CGPoint(), size: layout.contentSize).insetBy(dx: 16.0 + params.leftInset, dy: 0.0) @@ -576,7 +578,9 @@ class VoiceChatParticipantItemNode: ItemListRevealOptionsItemNode { if value > 0.0 { audioLevelView.startAnimating() avatarScale = 1.03 + level * 0.13 - audioLevelView.setColor(wavesColor, animated: true) + if let wavesColor = strongSelf.wavesColor { + audioLevelView.setColor(wavesColor, animated: true) + } } else { audioLevelView.stopAnimating(duration: 0.5) avatarScale = 1.0