diff --git a/src/app/avadapter.cpp b/src/app/avadapter.cpp index 62e0f4cb..b16dce86 100644 --- a/src/app/avadapter.cpp +++ b/src/app/avadapter.cpp @@ -337,7 +337,6 @@ AvAdapter::isCapturing() const auto callId = lrcInstance_->getCurrentCallId(); auto callModel = lrcInstance_->getCurrentCallModel(); auto call = callModel->getCall(callId); - // TODO enum for (const auto& m : call.mediaList) { if (m[DRing::Media::MediaAttributeKey::SOURCE].startsWith( DRing::Media::VideoProtocolPrefix::CAMERA) diff --git a/src/app/calladapter.cpp b/src/app/calladapter.cpp index d7ce8a7c..ddc608d7 100644 --- a/src/app/calladapter.cpp +++ b/src/app/calladapter.cpp @@ -692,7 +692,6 @@ CallAdapter::updateCallOverlay(const lrc::api::conversation::Info& convInfo) bool isAudioMuted = callInfo->status == lrc::api::call::Status::PAUSED; bool isGrid = callInfo->layout == lrc::api::call::Layout::GRID; QString previewId {}; - bool isVideoMuted = false; if (callInfo->status != lrc::api::call::Status::ENDED) { for (const auto& media : callInfo->mediaList) { if (media[DRing::Media::MediaAttributeKey::MEDIA_TYPE] @@ -702,8 +701,6 @@ CallAdapter::updateCallOverlay(const lrc::api::conversation::Info& convInfo) if (previewId.isEmpty()) { previewId = media[DRing::Media::MediaAttributeKey::SOURCE]; } - isVideoMuted |= media[DRing::Media::MediaAttributeKey::SOURCE].startsWith( - DRing::Media::VideoProtocolPrefix::CAMERA); } } else if (media[DRing::Media::MediaAttributeKey::LABEL] == "audio_0") { isAudioMuted |= media[DRing::Media::MediaAttributeKey::MUTED] == TRUE_STR; @@ -714,7 +711,6 @@ CallAdapter::updateCallOverlay(const lrc::api::conversation::Info& convInfo) Q_EMIT updateOverlay(isPaused, isAudioOnly, isAudioMuted, - isVideoMuted, accInfo.profileInfo.type == lrc::api::profile::Type::SIP, isGrid, previewId); diff --git a/src/app/calladapter.h b/src/app/calladapter.h index 6770411f..254ca3b8 100644 --- a/src/app/calladapter.h +++ b/src/app/calladapter.h @@ -99,7 +99,6 @@ Q_SIGNALS: void updateOverlay(bool isPaused, bool isAudioOnly, bool isAudioMuted, - bool isVideoMuted, bool isSIP, bool isGrid, const QString& previewId); diff --git a/src/app/mainview/components/CallOverlay.qml b/src/app/mainview/components/CallOverlay.qml index bb78bbe3..2bbaf26f 100644 --- a/src/app/mainview/components/CallOverlay.qml +++ b/src/app/mainview/components/CallOverlay.qml @@ -59,14 +59,11 @@ Item { || callViewContextMenu.peerIsRecording } - function updateUI(isPaused, isAudioOnly, isAudioMuted, - isVideoMuted, isSIP, - isGrid) { + function updateUI(isPaused, isAudioOnly, isAudioMuted, isSIP, isGrid) { if (isPaused !== undefined) { root.isPaused = isPaused root.isAudioOnly = isAudioOnly root.isAudioMuted = isAudioMuted - root.isVideoMuted = isVideoMuted callViewContextMenu.isVideoMuted = root.isVideoMuted root.isSIP = isSIP root.isGrid = isGrid diff --git a/src/app/mainview/components/OngoingCallPage.qml b/src/app/mainview/components/OngoingCallPage.qml index e15bb3b0..0a10721b 100644 --- a/src/app/mainview/components/OngoingCallPage.qml +++ b/src/app/mainview/components/OngoingCallPage.qml @@ -283,7 +283,7 @@ Rectangle { Connections { target: CallAdapter - function onUpdateOverlay(isPaused, isAudioOnly, isAudioMuted, isVideoMuted, + function onUpdateOverlay(isPaused, isAudioOnly, isAudioMuted, isSIP, isGrid, previewId) { if (previewId != "") { if (root.callPreviewId != previewId) @@ -298,7 +298,7 @@ Rectangle { callOverlay.showOnHoldImage(isPaused) audioCallPageRectCentralRect.visible = !isPaused && root.isAudioOnly && participantsLayer.count === 0 callOverlay.updateUI(isPaused, isAudioOnly, - isAudioMuted, isVideoMuted, + isAudioMuted, isSIP, isGrid) callOverlay.isVideoMuted = !AvAdapter.isCapturing()