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