From c844b36a47042bbbf89b5b94e58706e2befc9cea Mon Sep 17 00:00:00 2001 From: Christophe Deschamps Date: Mon, 9 May 2022 18:04:00 +0200 Subject: [PATCH] Update video button state in conference --- Classes/Swift/Voip/ViewModels/ControlsViewModel.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Classes/Swift/Voip/ViewModels/ControlsViewModel.swift b/Classes/Swift/Voip/ViewModels/ControlsViewModel.swift index fe9d9cfdd..0a6dea9bc 100644 --- a/Classes/Swift/Voip/ViewModels/ControlsViewModel.swift +++ b/Classes/Swift/Voip/ViewModels/ControlsViewModel.swift @@ -208,10 +208,10 @@ class ControlsViewModel { } func isVideoCallOrConferenceActive() -> Bool { - if let conference = core.conference, conference.isIn { - return conference.currentParams?.videoEnabled == true + if let currentCall = core.currentCall, let params = currentCall.params { + return params.videoEnabled && (currentCall.conference == nil || params.videoDirection == MediaDirection.SendRecv) } else { - return core.currentCall?.currentParams?.videoEnabled == true + return false } }