mirror of
https://git.jami.net/savoirfairelinux/jami-client-qt.git
synced 2025-08-27 02:03:24 +02:00
calloverlay: avoid multiple isRecording values
GitLab: #628 Change-Id: Ibe47bb0500324570a8da29c41ff71aaff158f23d
This commit is contained in:
parent
2f1b8bc2d0
commit
1a50d1105f
4 changed files with 23 additions and 22 deletions
|
@ -38,7 +38,6 @@ Control {
|
|||
property bool subMenuOpen: false
|
||||
|
||||
property real itemSpacing: 2
|
||||
property bool localIsRecording: false
|
||||
|
||||
signal chatClicked
|
||||
signal addToConferenceClicked
|
||||
|
@ -50,6 +49,7 @@ Control {
|
|||
signal shareScreenAreaClicked
|
||||
signal shareFileClicked
|
||||
signal pluginsClicked
|
||||
signal recordCallClicked
|
||||
|
||||
Component {
|
||||
id: buttonDelegate
|
||||
|
@ -275,7 +275,7 @@ Control {
|
|||
},
|
||||
Action {
|
||||
id: recordAction
|
||||
onTriggered: CallAdapter.recordThisCallToggle()
|
||||
onTriggered: root.recordCallClicked()
|
||||
checkable: true
|
||||
icon.source: JamiResources.record_black_24dp_svg
|
||||
icon.color: checked ? "red" : "white"
|
||||
|
|
|
@ -41,6 +41,7 @@ Item {
|
|||
property bool isAudioMuted
|
||||
property bool isVideoMuted
|
||||
property bool isRecording
|
||||
property bool remoteRecording
|
||||
property bool isSIP
|
||||
property bool isModerator
|
||||
property bool isConferenceCall
|
||||
|
@ -55,12 +56,6 @@ Item {
|
|||
anchors.fill: parent
|
||||
}
|
||||
|
||||
function setRecording(localIsRecording) {
|
||||
callViewContextMenu.localIsRecording = localIsRecording
|
||||
mainOverlay.recordingVisible = localIsRecording
|
||||
|| callViewContextMenu.peerIsRecording
|
||||
}
|
||||
|
||||
function updateUI(isPaused, isAudioOnly, isAudioMuted,
|
||||
isVideoMuted, isSIP,
|
||||
isConferenceCall, isGrid) {
|
||||
|
@ -73,7 +68,6 @@ Item {
|
|||
root.isSIP = isSIP
|
||||
root.isConferenceCall = isConferenceCall
|
||||
root.isGrid = isGrid
|
||||
mainOverlay.recordingVisible = isRecording
|
||||
root.localHandRaised = CallAdapter.isHandRaised()
|
||||
}
|
||||
root.isRecording = CallAdapter.isRecordingThisCall()
|
||||
|
@ -113,16 +107,13 @@ Item {
|
|||
}
|
||||
|
||||
mainOverlay.remoteRecordingLabel = state ? label : JamiStrings.peerStoppedRecording
|
||||
callViewContextMenu.peerIsRecording = state
|
||||
mainOverlay.recordingVisible = callViewContextMenu.localIsRecording
|
||||
|| callViewContextMenu.peerIsRecording
|
||||
root.remoteRecording = state
|
||||
callOverlayRectMouseArea.entered()
|
||||
}
|
||||
|
||||
function resetRemoteRecording() {
|
||||
mainOverlay.remoteRecordingLabel = ""
|
||||
callViewContextMenu.peerIsRecording = false
|
||||
mainOverlay.recordingVisible = callViewContextMenu.localIsRecording
|
||||
root.remoteRecording = false
|
||||
}
|
||||
|
||||
SipInputPanel {
|
||||
|
@ -194,10 +185,17 @@ Item {
|
|||
PluginHandlerPickerCreation.openPluginHandlerPicker()
|
||||
}
|
||||
|
||||
function recordClicked() {
|
||||
CallAdapter.recordThisCallToggle()
|
||||
updateUI()
|
||||
}
|
||||
|
||||
MainOverlay {
|
||||
id: mainOverlay
|
||||
|
||||
anchors.fill: parent
|
||||
isRecording: root.isRecording
|
||||
remoteRecording: root.remoteRecording
|
||||
|
||||
Connections {
|
||||
target: mainOverlay.callActionBar
|
||||
|
@ -209,6 +207,7 @@ Item {
|
|||
function onShareScreenClicked() { openShareScreen() }
|
||||
function onStopSharingClicked() { AvAdapter.stopSharing() }
|
||||
function onShareScreenAreaClicked() { openShareScreenArea() }
|
||||
function onRecordCallClicked() { recordClicked() }
|
||||
function onShareFileClicked() { jamiFileDialog.open() }
|
||||
function onPluginsClicked() { openPluginsMenu() }
|
||||
}
|
||||
|
@ -219,9 +218,10 @@ Item {
|
|||
|
||||
isSIP: root.isSIP
|
||||
isPaused: root.isPaused
|
||||
localIsRecording: root.isRecording
|
||||
isRecording: root.isRecording
|
||||
|
||||
onTransferCallButtonClicked: openContactPicker(ContactList.TRANSFER)
|
||||
onPluginItemClicked: openPluginsMenu()
|
||||
onRecordCallClicked: root.recordClicked()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -35,11 +35,11 @@ ContextMenuAutoLoader {
|
|||
property bool isSIP: false
|
||||
property bool isPaused: false
|
||||
property bool isVideoMuted: false
|
||||
property bool localIsRecording: false
|
||||
property bool peerIsRecording: false
|
||||
property bool isRecording: false
|
||||
|
||||
signal pluginItemClicked
|
||||
signal transferCallButtonClicked
|
||||
signal recordCallClicked
|
||||
|
||||
property list<GeneralMenuItem> menuItems: [
|
||||
GeneralMenuItem {
|
||||
|
@ -78,12 +78,11 @@ ContextMenuAutoLoader {
|
|||
GeneralMenuItem {
|
||||
id: localRecord
|
||||
|
||||
itemName: localIsRecording ? JamiStrings.stopRec : JamiStrings.startRec
|
||||
itemName: root.isRecording ? JamiStrings.stopRec : JamiStrings.startRec
|
||||
iconSource: JamiResources.fiber_manual_record_24dp_svg
|
||||
iconColor: JamiTheme.recordIconColor
|
||||
onClicked: {
|
||||
CallAdapter.recordThisCallToggle()
|
||||
localIsRecording = CallAdapter.isRecordingThisCall()
|
||||
root.recordCallClicked()
|
||||
}
|
||||
},
|
||||
GeneralMenuItem {
|
||||
|
|
|
@ -34,7 +34,6 @@ Item {
|
|||
property string timeText: "00:00"
|
||||
property string remoteRecordingLabel: ""
|
||||
|
||||
property alias recordingVisible: recordingRect.visible
|
||||
property alias callActionBar: __callActionBar
|
||||
|
||||
property bool frozen: callActionBar.overflowOpen ||
|
||||
|
@ -44,6 +43,8 @@ Item {
|
|||
|
||||
property string muteAlertMessage: ""
|
||||
property bool muteAlertActive: false
|
||||
property bool remoteRecording: false
|
||||
property bool isRecording: false
|
||||
|
||||
onMuteAlertActiveChanged: {
|
||||
if (muteAlertActive) {
|
||||
|
@ -93,7 +94,7 @@ Item {
|
|||
root.timeText = CallAdapter.getCallDurationTime(
|
||||
LRCInstance.currentAccountId,
|
||||
LRCInstance.selectedConvUid)
|
||||
if (root.opacity === 0 && !callViewContextMenu.peerIsRecording)
|
||||
if (root.opacity === 0 && !root.remoteRecording)
|
||||
root.remoteRecordingLabel = ""
|
||||
}
|
||||
}
|
||||
|
@ -199,6 +200,7 @@ Item {
|
|||
|
||||
Rectangle {
|
||||
id: recordingRect
|
||||
visible: root.isRecording || root.remoteRecording
|
||||
|
||||
Layout.alignment: Qt.AlignVCenter | Qt.AlignRight
|
||||
Layout.rightMargin: JamiTheme.preferredMarginSize
|
||||
|
|
Loading…
Add table
Reference in a new issue