1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-11-29 22:48:10 +02:00

Fixed React Native app to work with latest versions of packages and removed dependency to yarn

This commit is contained in:
Laurent Cozic
2017-10-30 18:17:01 +00:00
parent a43f5a1b53
commit 5492e715f8
29 changed files with 6308 additions and 4320 deletions

View File

@@ -20,7 +20,7 @@ class Checkbox extends Component {
}
componentWillMount() {
this.state = { checked: this.props.checked };
this.setState({ checked: this.props.checked });
}
componentWillReceiveProps(newProps) {

View File

@@ -71,7 +71,7 @@ class NoteListComponent extends Component {
componentWillMount() {
const newDataSource = this.state.dataSource.cloneWithRows(this.filterNotes(this.props.items));
this.state = { dataSource: newDataSource };
this.setState({ dataSource: newDataSource });
}
componentWillReceiveProps(newProps) {

View File

@@ -326,7 +326,8 @@ class NoteScreenComponent extends BaseScreenComponent {
const format = res.type == 'image/png' ? 'PNG' : 'JPEG';
reg.logger().info('Resizing image ' + localFilePath);
const resizedImagePath = await ImageResizer.createResizedImage(localFilePath, dimensions.width, dimensions.height, format, 85);
const resizedImage = await ImageResizer.createResizedImage(localFilePath, dimensions.width, dimensions.height, format, 85);
const resizedImagePath = resizedImage.uri;
reg.logger().info('Resized image ', resizedImagePath);
RNFetchBlob.fs.cp(resizedImagePath, targetPath); // mv doesn't work ("source path does not exist") so need to do cp and unlink