From efc6e226e67545fe1ed281cfc21fb6afe707e3c0 Mon Sep 17 00:00:00 2001 From: Amir Ghezelbash Date: Thu, 19 Dec 2024 17:02:29 +0300 Subject: [PATCH 1/2] fix: Do not show notification when call feedback is skipped --- .../Modals/QualityFeedbackModal/QualityFeedbackModal.tsx | 9 ++++++--- src/types/i18n.d.ts | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/script/components/Modals/QualityFeedbackModal/QualityFeedbackModal.tsx b/src/script/components/Modals/QualityFeedbackModal/QualityFeedbackModal.tsx index 42a63e7dfab..c60d3dae8a5 100644 --- a/src/script/components/Modals/QualityFeedbackModal/QualityFeedbackModal.tsx +++ b/src/script/components/Modals/QualityFeedbackModal/QualityFeedbackModal.tsx @@ -66,7 +66,7 @@ export const QualityFeedbackModal = () => { return null; } - const handleCloseModal = () => { + const handleCloseModal = (skipNotification = false) => { if (!selfUser) { setQualityFeedbackModalShown(false); return; @@ -80,7 +80,10 @@ export const QualityFeedbackModal = () => { currentStorageData[selfUser.id] = isChecked ? null : dateUntilShowModal.getTime(); localStorage.setItem(CALL_QUALITY_FEEDBACK_KEY, JSON.stringify(currentStorageData)); - submittedNotification.show(); + + if (!skipNotification) { + submittedNotification.show(); + } } catch (error) { logger.warn(`Can't send feedback: ${(error as Error).message}`); } finally { @@ -102,7 +105,7 @@ export const QualityFeedbackModal = () => { [Segmentation.CALL.QUALITY_REVIEW_LABEL]: RatingListLabel.DISMISSED, }); - handleCloseModal(); + handleCloseModal(true); }; return ( diff --git a/src/types/i18n.d.ts b/src/types/i18n.d.ts index 2431e8dc617..dd0a2a51e3a 100644 --- a/src/types/i18n.d.ts +++ b/src/types/i18n.d.ts @@ -1630,7 +1630,7 @@ declare module 'I18n/en-US.json' { 'videoCallOverlayViewModeSpeakers': `Show active speakers only`; 'videoCallParticipantConnecting': `Connecting...`; 'videoCallParticipantLowerYourHand': `Lower your hand`; - 'videoCallParticipantPressSpaceToUnmuteNotification': `Microphone temporarily on`; + 'videoCallParticipantPressSpaceToUnmuteNotification': `Your microphone is on`; 'videoCallParticipantRaiseYourHand': `Raise your hand`; 'videoCallParticipantRaisedHandRaiseDuration': `Hand raised for {duration}`; 'videoCallParticipantRaisedSelfHandUp': `You have raised your hand up`; From 4bdc579627aca5a2de44663e704c8076727fd29b Mon Sep 17 00:00:00 2001 From: Amir Ghezelbash Date: Thu, 19 Dec 2024 17:19:26 +0300 Subject: [PATCH 2/2] use object --- .../Modals/QualityFeedbackModal/QualityFeedbackModal.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/script/components/Modals/QualityFeedbackModal/QualityFeedbackModal.tsx b/src/script/components/Modals/QualityFeedbackModal/QualityFeedbackModal.tsx index c60d3dae8a5..cdbead07f4f 100644 --- a/src/script/components/Modals/QualityFeedbackModal/QualityFeedbackModal.tsx +++ b/src/script/components/Modals/QualityFeedbackModal/QualityFeedbackModal.tsx @@ -66,7 +66,7 @@ export const QualityFeedbackModal = () => { return null; } - const handleCloseModal = (skipNotification = false) => { + const handleCloseModal = ({skipNotification = false} = {}) => { if (!selfUser) { setQualityFeedbackModalShown(false); return; @@ -105,7 +105,7 @@ export const QualityFeedbackModal = () => { [Segmentation.CALL.QUALITY_REVIEW_LABEL]: RatingListLabel.DISMISSED, }); - handleCloseModal(true); + handleCloseModal({skipNotification: true}); }; return (