From 7f38eeca4b80620bbede42965139d4a97ade7760 Mon Sep 17 00:00:00 2001 From: Maksim Sukharev Date: Tue, 17 Oct 2023 11:53:18 +0200 Subject: [PATCH] force show MediaSettings if consent is required Signed-off-by: Maksim Sukharev --- src/components/MediaSettings/MediaSettings.vue | 18 +++++++----------- src/components/TopBar/CallButton.vue | 14 +++++--------- 2 files changed, 12 insertions(+), 20 deletions(-) diff --git a/src/components/MediaSettings/MediaSettings.vue b/src/components/MediaSettings/MediaSettings.vue index 9b6c372b9543..4f290759a217 100644 --- a/src/components/MediaSettings/MediaSettings.vue +++ b/src/components/MediaSettings/MediaSettings.vue @@ -121,7 +121,8 @@ {{ t('spreed', 'Always show preview for this conversation') }} @@ -135,7 +136,7 @@ -

+

{{ t('spreed', 'The call is being recorded.') }}

@@ -356,14 +357,9 @@ export default { return this.conversation.hasCall || this.conversation.hasCallOverwrittenByChat }, - isStartingRecording() { - return this.conversation.callRecording === CALL.RECORDING.VIDEO_STARTING - || this.conversation.callRecording === CALL.RECORDING.AUDIO_STARTING - }, - - isRecording() { - return this.conversation.callRecording === CALL.RECORDING.VIDEO - || this.conversation.callRecording === CALL.RECORDING.AUDIO + isCurrentlyRecording() { + return [CALL.RECORDING.VIDEO_STARTING, CALL.RECORDING.AUDIO_STARTING, + CALL.RECORDING.VIDEO, CALL.RECORDING.AUDIO].includes(this.conversation.callRecording) }, canFullModerate() { @@ -381,7 +377,7 @@ export default { }, showRecordingWarning() { - return !this.isInCall && (this.isStartingRecording || this.isRecording || this.isRecordingConsentRequired) + return !this.isInCall && (this.isCurrentlyRecording || this.isRecordingConsentRequired) }, showSilentCallOption() { diff --git a/src/components/TopBar/CallButton.vue b/src/components/TopBar/CallButton.vue index f671eff67e20..a7b72b5e72de 100644 --- a/src/components/TopBar/CallButton.vue +++ b/src/components/TopBar/CallButton.vue @@ -188,14 +188,10 @@ export default { return this.$store.getters.conversation(this.token) || this.$store.getters.dummyConversation }, - isStartingRecording() { - return this.conversation.callRecording === CALL.RECORDING.VIDEO_STARTING - || this.conversation.callRecording === CALL.RECORDING.AUDIO_STARTING - }, - - isRecording() { - return this.conversation.callRecording === CALL.RECORDING.VIDEO - || this.conversation.callRecording === CALL.RECORDING.AUDIO + showRecordingWarning() { + return [CALL.RECORDING.VIDEO_STARTING, CALL.RECORDING.AUDIO_STARTING, + CALL.RECORDING.VIDEO, CALL.RECORDING.AUDIO].includes(this.conversation.callRecording) + || this.conversation.recordingConsent === CALL.RECORDING_CONSENT.REQUIRED }, showMediaSettings() { @@ -371,7 +367,7 @@ export default { return } - if (this.isStartingRecording || this.isRecording || this.showMediaSettings) { + if (this.showRecordingWarning || this.showMediaSettings) { emit('talk:media-settings:show') } else { emit('talk:media-settings:hide')