Display info dialogs if unable to start voice broadcasts (#9453)

This commit is contained in:
Michael Weimann 2022-10-19 15:01:14 +02:00 committed by GitHub
parent 3c3df11d32
commit bb0c175b7e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 546 additions and 160 deletions

View file

@ -85,7 +85,6 @@ interface IProps {
relation?: IEventRelation;
e2eStatus?: E2EStatus;
compact?: boolean;
showVoiceBroadcastButton?: boolean;
}
interface IState {
@ -384,10 +383,6 @@ export default class MessageComposer extends React.Component<IProps, IState> {
return this.state.showStickersButton && !isLocalRoom(this.props.room);
}
private get showVoiceBroadcastButton(): boolean {
return this.props.showVoiceBroadcastButton && this.state.showVoiceBroadcastButton;
}
public render() {
const isWysiwygComposerEnabled = SettingsStore.getValue("feature_wysiwyg_composer");
const controls = [
@ -532,10 +527,10 @@ export default class MessageComposer extends React.Component<IProps, IState> {
showPollsButton={this.state.showPollsButton}
showStickersButton={this.showStickersButton}
toggleButtonMenu={this.toggleButtonMenu}
showVoiceBroadcastButton={this.showVoiceBroadcastButton}
showVoiceBroadcastButton={this.state.showVoiceBroadcastButton}
onStartVoiceBroadcastClick={() => {
startNewVoiceBroadcastRecording(
this.props.room.roomId,
this.props.room,
MatrixClientPeg.get(),
VoiceBroadcastRecordingsStore.instance(),
);