Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions app/containers/MessageBox/Recording.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,6 @@ export default class extends React.PureComponent {
if (!didSucceed) {
return onFinish && onFinish(didSucceed);
}
if (isAndroid) {
filePath = filePath.startsWith('file://') ? filePath : `file://${ filePath }`;
}
const fileInfo = {
name: this.name,
mime: 'audio/aac',
Expand All @@ -111,8 +108,9 @@ export default class extends React.PureComponent {
finishAudioMessage = async() => {
try {
this.recording = false;
const filePath = await AudioRecorder.stopRecording();
let filePath = await AudioRecorder.stopRecording();
if (isAndroid) {
filePath = filePath.startsWith('file://') ? filePath : `file://${ filePath }`;
const data = await FileSystem.getInfoAsync(decodeURIComponent(filePath), { size: true });
this.finishRecording(true, filePath, data.size);
}
Expand Down