1
0
Fork 0
mirror of https://git.jami.net/savoirfairelinux/jami-client-qt.git synced 2025-09-10 12:03:18 +02:00

calloverlay: fix record status

We can directly use the info from the calloverlay and refresh when
updating the UI

Change-Id: I7bc2b17ebfba251e26bd5d0328d2b981722cb727
GitLab: #594
This commit is contained in:
Sébastien Blin 2021-11-12 14:24:08 -05:00
parent 3380a26788
commit 8cefda6e33
5 changed files with 5 additions and 7 deletions

View file

@ -651,7 +651,6 @@ CallAdapter::updateCallOverlay(const lrc::api::conversation::Info& convInfo)
bool isAudioOnly = call->isAudioOnly && !isPaused;
bool isAudioMuted = call->audioMuted && (call->status != lrc::api::call::Status::PAUSED);
bool isVideoMuted = call->isAudioOnly || (call->videoMuted && !isPaused);
bool isRecording = isRecordingThisCall();
bool isConferenceCall = !convInfo.confId.isEmpty()
|| (convInfo.confId.isEmpty() && call->participantsInfos.size() != 0);
bool isGrid = call->layout == lrc::api::call::Layout::GRID;
@ -660,7 +659,6 @@ CallAdapter::updateCallOverlay(const lrc::api::conversation::Info& convInfo)
isAudioOnly,
isAudioMuted,
isVideoMuted,
isRecording,
accInfo.profileInfo.type == lrc::api::profile::Type::SIP,
isConferenceCall,
isGrid);

View file

@ -99,7 +99,6 @@ Q_SIGNALS:
bool isAudioOnly,
bool isAudioMuted,
bool isVideoMuted,
bool isRecording,
bool isSIP,
bool isConferenceCall,
bool isGrid);

View file

@ -353,6 +353,7 @@ Control {
overflowItemCount = CallOverlayModel.secondaryModel().rowCount()
muteAudioAction.checked = isAudioMuted
recordAction.checked = CallAdapter.isRecordingThisCall()
muteVideoAction.checked = isAudioOnly ? true : isVideoMuted
}

View file

@ -62,7 +62,7 @@ Item {
}
function updateUI(isPaused, isAudioOnly, isAudioMuted,
isVideoMuted, isRecording, isSIP,
isVideoMuted, isSIP,
isConferenceCall, isGrid) {
if (isPaused !== undefined) {
root.isPaused = isPaused
@ -70,13 +70,13 @@ Item {
root.isAudioMuted = isAudioMuted
root.isVideoMuted = isVideoMuted
callViewContextMenu.isVideoMuted = root.isVideoMuted
root.isRecording = isRecording
root.isSIP = isSIP
root.isConferenceCall = isConferenceCall
root.isGrid = isGrid
mainOverlay.recordingVisible = isRecording
root.localHandRaised = CallAdapter.isHandRaised()
}
root.isRecording = CallAdapter.isRecordingThisCall()
root.isModerator = CallAdapter.isCurrentModerator()
}

View file

@ -273,13 +273,13 @@ Rectangle {
target: CallAdapter
function onUpdateOverlay(isPaused, isAudioOnly, isAudioMuted, isVideoMuted,
isRecording, isSIP, isConferenceCall, isGrid) {
isSIP, isConferenceCall, isGrid, previewId) {
callOverlay.showOnHoldImage(isPaused)
root.isAudioOnly = isAudioOnly
audioCallPageRectCentralRect.visible = !isPaused && root.isAudioOnly
callOverlay.updateUI(isPaused, isAudioOnly,
isAudioMuted, isVideoMuted,
isRecording, isSIP,
isSIP,
isConferenceCall, isGrid)
callOverlay.participantsLayer.update(CallAdapter.getConferencesInfos())
}