mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-08-01 07:57:01 +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 peerPresenceManager: PeerPresenceStatusManager?
|
||||||
private var layoutParams: (VoiceChatParticipantItem, ListViewItemLayoutParams, Bool, Bool)?
|
private var layoutParams: (VoiceChatParticipantItem, ListViewItemLayoutParams, Bool, Bool)?
|
||||||
|
private var wavesColor: UIColor?
|
||||||
|
|
||||||
init() {
|
init() {
|
||||||
self.topStripeNode = ASDisplayNode()
|
self.topStripeNode = ASDisplayNode()
|
||||||
self.topStripeNode.isLayerBacked = true
|
self.topStripeNode.isLayerBacked = true
|
||||||
@ -437,6 +438,7 @@ class VoiceChatParticipantItemNode: ItemListRevealOptionsItemNode {
|
|||||||
return (layout, { [weak self] synchronousLoad, animated in
|
return (layout, { [weak self] synchronousLoad, animated in
|
||||||
if let strongSelf = self {
|
if let strongSelf = self {
|
||||||
strongSelf.layoutParams = (item, params, first, last)
|
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 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)
|
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 {
|
if value > 0.0 {
|
||||||
audioLevelView.startAnimating()
|
audioLevelView.startAnimating()
|
||||||
avatarScale = 1.03 + level * 0.13
|
avatarScale = 1.03 + level * 0.13
|
||||||
audioLevelView.setColor(wavesColor, animated: true)
|
if let wavesColor = strongSelf.wavesColor {
|
||||||
|
audioLevelView.setColor(wavesColor, animated: true)
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
audioLevelView.stopAnimating(duration: 0.5)
|
audioLevelView.stopAnimating(duration: 0.5)
|
||||||
avatarScale = 1.0
|
avatarScale = 1.0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user