Device manager - silence call ringers when local notifications are silenced (#9420)
* silence call ringers when local notifications are silenced * more coverage for silencing * explain disabled silence button * lint * increase wait for modal Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
1d1860842e
commit
2d9f828810
8 changed files with 280 additions and 8 deletions
|
@ -85,6 +85,12 @@ export default class IncomingLegacyCallToast extends React.Component<IProps, ISt
|
|||
const call = this.props.call;
|
||||
const room = MatrixClientPeg.get().getRoom(LegacyCallHandler.instance.roomIdForCall(call));
|
||||
const isVoice = call.type === CallType.Voice;
|
||||
const callForcedSilent = LegacyCallHandler.instance.isForcedSilent();
|
||||
|
||||
let silenceButtonTooltip = this.state.silenced ? _t("Sound on") : _t("Silence call");
|
||||
if (callForcedSilent) {
|
||||
silenceButtonTooltip = _t("Notifications silenced");
|
||||
}
|
||||
|
||||
const contentClass = classNames("mx_IncomingLegacyCallToast_content", {
|
||||
"mx_IncomingLegacyCallToast_content_voice": isVoice,
|
||||
|
@ -128,8 +134,9 @@ export default class IncomingLegacyCallToast extends React.Component<IProps, ISt
|
|||
</div>
|
||||
<AccessibleTooltipButton
|
||||
className={silenceClass}
|
||||
disabled={callForcedSilent}
|
||||
onClick={this.onSilenceClick}
|
||||
title={this.state.silenced ? _t("Sound on") : _t("Silence call")}
|
||||
title={silenceButtonTooltip}
|
||||
/>
|
||||
</React.Fragment>;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue