Add "You are presenting toast"

Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
Šimon Brandner 2021-07-20 16:17:07 +02:00
parent e5563ac60b
commit 3751f04cef
No known key found for this signature in database
GPG key ID: 55C211A1226CB17D
2 changed files with 9 additions and 2 deletions

View file

@ -740,16 +740,22 @@ export default class CallView extends React.Component<IProps, IState> {
});
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 = (
<div className={presentingClasses}>
{ _t('%(sharerName)s is presenting', { sharerName }) }
{ text }
</div>
);
}