diff --git a/app/containers/MessageBox/RecordAudio.tsx b/app/containers/MessageBox/RecordAudio.tsx index cec55761..fa6c509e 100644 --- a/app/containers/MessageBox/RecordAudio.tsx +++ b/app/containers/MessageBox/RecordAudio.tsx @@ -63,20 +63,24 @@ export default class RecordAudio extends React.PureComponent { try { const permission = await Audio.getPermissionsAsync(); @@ -108,17 +116,20 @@ export default class RecordAudio extends React.PureComponent { logEvent(events.ROOM_AUDIO_RECORD); if (!this.isRecorderBusy) { this.isRecorderBusy = true; + this.LastDuration = 0; try { const canRecord = await this.isRecordingPermissionGranted(); if (canRecord) { await Audio.setAudioModeAsync(RECORDING_MODE); + this.setState({ isRecorderActive: true }); this.recording = new Audio.Recording(); await this.recording.prepareToRecordAsync(RECORDING_SETTINGS); this.recording.setOnRecordingStatusUpdate(this.onRecordingStatusUpdate); @@ -159,7 +170,7 @@ export default class RecordAudio extends React.PureComponent + + + + + {this.GetLastDuration} + + + + + + ); + } + return ( @@ -207,9 +244,10 @@ export default class RecordAudio extends React.PureComponent - + - {this.duration} + {this.duration} + - + ); diff --git a/app/containers/MessageBox/styles.ts b/app/containers/MessageBox/styles.ts index 8d934799..6f459909 100644 --- a/app/containers/MessageBox/styles.ts +++ b/app/containers/MessageBox/styles.ts @@ -139,7 +139,8 @@ export default StyleSheet.create({ flex: 1, justifyContent: 'space-between' }, - recordingCancelText: { + recordingDurationText: { + width: 60, fontSize: 16, ...sharedStyles.textRegular },