Support updated voice chats API

This commit is contained in:
Ali
2021-07-09 00:50:50 +04:00
parent bdc183673b
commit b8beeabfc6
7 changed files with 101 additions and 49 deletions

View File

@@ -4368,11 +4368,15 @@ public final class VoiceChatController: ViewController {
self.actionButton.isDisabled = !actionButtonEnabled
self.actionButton.update(size: centralButtonSize, buttonSize: CGSize(width: 112.0, height: 112.0), state: actionButtonState, title: actionButtonTitle, subtitle: actionButtonSubtitle, dark: self.isFullscreen, small: smallButtons, animated: true)
var hasCameraButton = self.callState?.isVideoEnabled ?? false
let isVideoEnabled = self.callState?.isVideoEnabled ?? false
var hasCameraButton = isVideoEnabled
if let joinedVideo = self.joinedVideo {
hasCameraButton = joinedVideo
}
if !isVideoEnabled {
hasCameraButton = false
}
switch actionButtonState {
case let .active(state):
switch state {