mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-07-31 07:30:40 +00:00
Voice Chat UI fixes
This commit is contained in:
parent
9441f3999d
commit
61a81794f0
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user