diff --git a/submodules/TelegramCallsUI/Sources/PresentationGroupCall.swift b/submodules/TelegramCallsUI/Sources/PresentationGroupCall.swift index 94cbaf6263..ce8be594d5 100644 --- a/submodules/TelegramCallsUI/Sources/PresentationGroupCall.swift +++ b/submodules/TelegramCallsUI/Sources/PresentationGroupCall.swift @@ -73,7 +73,7 @@ public final class PresentationGroupCallImpl: PresentationGroupCall { private class SpeakingParticipantsContext { private let speakingLevelThreshold: Float = 0.15 private let cutoffTimeout: Int32 = 1 - private let silentTimeout: Int32 = 2 + private let silentTimeout: Int32 = 3 struct Participant { let timestamp: Int32 diff --git a/submodules/TelegramCallsUI/Sources/VoiceChatController.swift b/submodules/TelegramCallsUI/Sources/VoiceChatController.swift index f1cd9aba43..9472f2a775 100644 --- a/submodules/TelegramCallsUI/Sources/VoiceChatController.swift +++ b/submodules/TelegramCallsUI/Sources/VoiceChatController.swift @@ -481,10 +481,16 @@ public final class VoiceChatController: ViewController { return } if let groupMembers = strongSelf.currentGroupMembers { - strongSelf.updateMembers(muteState: strongSelf.callState?.muteState, groupMembers: groupMembers, callMembers: callMembers.participants, speakingPeers: callMembers.speakingParticipants ?? Set(), invitedPeers: strongSelf.currentInvitedPeers ?? Set()) + strongSelf.updateMembers(muteState: strongSelf.callState?.muteState, groupMembers: groupMembers, callMembers: callMembers.participants, speakingPeers: callMembers.speakingParticipants, invitedPeers: strongSelf.currentInvitedPeers ?? Set()) } else { strongSelf.currentCallMembers = callMembers.participants } + + //TODO:localize + let subtitle = strongSelf.presentationData.strings.Conversation_StatusMembers(Int32(callMembers.totalCount)) + if let titleView = strongSelf.controller?.navigationItem.titleView as? VoiceChatControllerTitleView { + titleView.set(title: "Voice Chat", subtitle: subtitle) + } }) self.invitedPeersDisposable = (self.call.invitedPeers @@ -516,21 +522,6 @@ public final class VoiceChatController: ViewController { return } - guard let peer = view.peers[view.peerId] else { - return - } - //TODO:localize - var subtitle = "group" - if let cachedData = view.cachedData as? CachedChannelData { - if let memberCount = cachedData.participantsSummary.memberCount { - subtitle = strongSelf.presentationData.strings.Conversation_StatusMembers(memberCount) - } - } - - let titleView = VoiceChatControllerTitleView(theme: strongSelf.presentationData.theme) - titleView.set(title: "Voice Chat", subtitle: subtitle) - strongSelf.controller?.navigationItem.titleView = titleView - if !strongSelf.didSetDataReady { strongSelf.didSetDataReady = true strongSelf.controller?.dataReady.set(true) @@ -674,6 +665,10 @@ public final class VoiceChatController: ViewController { override func didLoad() { super.didLoad() + let titleView = VoiceChatControllerTitleView(theme: self.presentationData.theme) + titleView.set(title: "Voice Chat", subtitle: "connecting") + self.controller?.navigationItem.titleView = titleView + let longTapRecognizer = UILongPressGestureRecognizer(target: self, action: #selector(self.actionButtonPressGesture(_:))) longTapRecognizer.minimumPressDuration = 0.001 self.actionButton.view.addGestureRecognizer(longTapRecognizer)