Various Fixes

This commit is contained in:
Ilya Laktyushin
2021-03-23 15:14:09 +05:00
parent 9e25139b1b
commit 6c6e287427
4 changed files with 20 additions and 8 deletions

View File

@@ -563,7 +563,12 @@ public final class VoiceChatController: ViewController {
var text: VoiceChatParticipantItem.ParticipantText
var expandedText: VoiceChatParticipantItem.ParticipantText?
let icon: VoiceChatParticipantItem.Icon
switch peerEntry.state {
var state = peerEntry.state
if let muteState = peerEntry.muteState, case .speaking = state, muteState.mutedByYou || !muteState.canUnmute {
state = .listening
}
switch state {
case .listening:
if let muteState = peerEntry.muteState, muteState.mutedByYou {
text = .text(presentationData.strings.VoiceChat_StatusMutedForYou, .destructive)