Merge pull request #730 from esteemapp/bugfix/581

fixed draft post
This commit is contained in:
uğur erdal 2019-03-28 16:13:40 +03:00 committed by GitHub
commit 5edb7b9727
2 changed files with 6 additions and 5 deletions

View File

@ -279,8 +279,8 @@ class EditorContainer extends Component {
_submitPost = async (fields) => {
const {
navigation, currentAccount, pinCode, intl, isDefaultFooter
} = this.props;
navigation, currentAccount, pinCode, intl, isDefaultFooter,
} = this.props;
if (currentAccount) {
this.setState({ isPostSending: true });

View File

@ -38,15 +38,16 @@ class EditorScreen extends Component {
}
// Component Life Cycles
componentWillReceiveProps = (nextProps) => {
componentWillReceiveProps = async (nextProps) => {
const { draftPost, isUploading } = this.props;
if (nextProps.draftPost && draftPost !== nextProps.draftPost) {
this.setState({
await this.setState(prevState => ({
fields: {
...prevState.fields,
...nextProps.draftPost,
},
});
}));
}
if (isUploading !== nextProps) {