fix: publish button disabled for file uploads

This commit is contained in:
Akinwale Ariwodola 2019-09-23 17:13:36 +01:00
parent bd23736c37
commit 0ddeaf0f27

View file

@ -411,7 +411,11 @@ class PublishPage extends React.PureComponent {
if (publishFormValues.thumbnail && !this.state.uploadedThumbnailUri) {
const { thumbnail } = publishFormValues;
updatePublishFormState({ currentThumbnailUri: thumbnail, uploadedThumbnailUri: thumbnail });
this.setState({ currentThumbnailUri: thumbnail, uploadedThumbnailUri: thumbnail });
this.setState({
currentThumbnailUri: thumbnail,
uploadedThumbnailUri: thumbnail,
uploadThumbnailStarted: false,
});
}
}
@ -1117,7 +1121,7 @@ class PublishPage extends React.PureComponent {
<View style={publishStyle.rightActionButtons}>
<Button
style={publishStyle.publishButton}
disabled={!this.state.canPublish || !this.state.uploadedThumbnailUri}
disabled={!this.state.canPublish || this.state.uploadThumbnailStarted}
text={this.state.editMode ? 'Save changes' : 'Publish'}
onPress={this.handlePublishPressed}
/>