From 3751f04cef2d87f8daae9fe3e13f29b2d9190c96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Brandner?= Date: Tue, 20 Jul 2021 16:17:07 +0200 Subject: [PATCH] Add "You are presenting toast" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Šimon Brandner --- src/components/views/voip/CallView.tsx | 10 ++++++++-- src/i18n/strings/en_EN.json | 1 + 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/components/views/voip/CallView.tsx b/src/components/views/voip/CallView.tsx index f4ffa35aeb..47683b4657 100644 --- a/src/components/views/voip/CallView.tsx +++ b/src/components/views/voip/CallView.tsx @@ -740,16 +740,22 @@ export default class CallView extends React.Component { }); let presenting; - if (this.state.primaryFeed?.purpose === SDPStreamMetadataPurpose.Screenshare) { + if ( + this.state.primaryFeed?.purpose === SDPStreamMetadataPurpose.Screenshare || + this.props.call.isScreensharing() + ) { const presentingClasses = classNames({ mx_CallView_presenting: true, mx_CallView_presenting_hidden: !this.state.controlsVisible, }); const sharerName = this.state.primaryFeed.getMember().name; + const text = this.props.call.isScreensharing() + ? _t("You are presenting") + : _t('%(sharerName)s is presenting', { sharerName }); presenting = (
- { _t('%(sharerName)s is presenting', { sharerName }) } + { text }
); } diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index 2a901c564e..bdd68e0ce3 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -894,6 +894,7 @@ "You held the call Resume": "You held the call Resume", "%(peerName)s held the call": "%(peerName)s held the call", "Connecting": "Connecting", + "You are presenting": "You are presenting", "%(sharerName)s is presenting": "%(sharerName)s is presenting", "Video Call": "Video Call", "Voice Call": "Voice Call",