Skip to content

Commit

Permalink
[FIX] Record audio message throws exception when FileSystem.getInfoAs…
Browse files Browse the repository at this point in the history
…ync is called (#1272)
  • Loading branch information
diegolmello authored Oct 4, 2019
1 parent b795a2f commit 79a936d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/containers/MessageBox/Recording.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
} from 'react-native';
import { AudioRecorder, AudioUtils } from 'react-native-audio';
import { BorderlessButton } from 'react-native-gesture-handler';
import FileSystem from 'expo-file-system';
import RNFetchBlob from 'rn-fetch-blob';

import styles from './styles';
import I18n from '../../i18n';
Expand Down Expand Up @@ -105,7 +105,7 @@ export default class extends React.PureComponent {
this.recording = false;
const filePath = await AudioRecorder.stopRecording();
if (isAndroid) {
const data = await FileSystem.getInfoAsync(decodeURIComponent(filePath));
const data = await RNFetchBlob.fs.stat(decodeURIComponent(filePath));
this.finishRecording(true, filePath, data.size);
}
} catch (err) {
Expand Down

0 comments on commit 79a936d

Please sign in to comment.