diff --git a/src/renderer/component/publishForm/view.jsx b/src/renderer/component/publishForm/view.jsx index 7fa13d98e..a0fd41e45 100644 --- a/src/renderer/component/publishForm/view.jsx +++ b/src/renderer/component/publishForm/view.jsx @@ -50,6 +50,7 @@ type Props = { publishing: boolean, balance: number, isStillEditing: boolean, + thumbnailUploadStatus: string, clearPublish: () => void, resolveUri: string => void, scrollToTop: () => void, @@ -73,7 +74,10 @@ class PublishForm extends React.PureComponent { } componentWillMount() { - this.props.resetThumbnailStatus(); + const { isStillEditing, thumbnail } = this.props; + if (!isStillEditing || !thumbnail) { + this.props.resetThumbnailStatus(); + } } getNewUri(name: string, channel: string) { diff --git a/src/renderer/redux/actions/publish.js b/src/renderer/redux/actions/publish.js index 0ad568a0c..b6d619115 100644 --- a/src/renderer/redux/actions/publish.js +++ b/src/renderer/redux/actions/publish.js @@ -22,8 +22,10 @@ type PromiseAction = Promise; type Dispatch = (action: Action | PromiseAction | Array) => any; type GetState = () => {}; -export const doClearPublish = () => (dispatch: Dispatch): Action => +export const doClearPublish = () => (dispatch: Dispatch): PromiseAction => { dispatch({ type: ACTIONS.CLEAR_PUBLISH }); + return dispatch(doResetThumbnailStatus()); +}; export const doUpdatePublishForm = (publishFormValue: UpdatePublishFormData) => ( dispatch: Dispatch @@ -160,6 +162,7 @@ export const doPrepareEdit = (claim: any, uri: string) => (dispatch: Dispatch) = thumbnail, title, uri, + uploadThumbnailStatus: thumbnail ? STATUSES.MANUAL : undefined, }; dispatch({ type: ACTIONS.DO_PREPARE_EDIT, data: publishData });