1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-11-11 20:22:36 +03:00

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
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>
);
}