Make all buttons part of a button array

Preparation work for narrow layout of the message composer.
The voice record button needed to be extracted from VoiceRecordComposerTile
This commit is contained in:
Germain Souquet 2021-08-25 11:35:23 +01:00
parent 52e1884bbd
commit 3c33e3cc61
2 changed files with 19 additions and 4 deletions

View file

@ -137,7 +137,7 @@ export default class VoiceRecordComposerTile extends React.PureComponent<IProps,
await this.disposeRecording();
};
private onRecordStartEndClick = async () => {
public onRecordStartEndClick = async () => {
if (this.state.recorder) {
await this.state.recorder.stop();
return;
@ -215,6 +215,8 @@ export default class VoiceRecordComposerTile extends React.PureComponent<IProps,
}
public render(): ReactNode {
if (!this.state.recordingPhase) return null;
let stopOrRecordBtn;
let deleteButton;
if (!this.state.recordingPhase || this.state.recordingPhase === RecordingState.Started) {