diff --git a/src/components/basicHeader/view/basicHeaderView.js b/src/components/basicHeader/view/basicHeaderView.js index 5bef6e655..a0482b012 100644 --- a/src/components/basicHeader/view/basicHeaderView.js +++ b/src/components/basicHeader/view/basicHeaderView.js @@ -37,7 +37,6 @@ const BasicHeaderView = ({ isModalHeader, isPreviewActive, isReply, - isEdit, quickTitle, rightButtonText, rightIconName, @@ -173,7 +172,7 @@ const BasicHeaderView = ({ onPress={() => (isModalHeader ? handleOnPressClose() : handleOnPressBackButton())} disabled={disabled} /> - {isHasIcons && !isReply && !isEdit && ( + {isHasIcons && !isReply && ( void; handleThumbSelection:(index:number)=>void; @@ -46,6 +47,7 @@ interface EditorSettingsModalProps { const EditorSettingsModal = forwardRef(({ body, draftId, + isEdit, isCommunityPost, handleRewardChange, handleThumbSelection, @@ -111,57 +113,61 @@ const EditorSettingsModal = forwardRef(({ const _renderContent = ( - { - setScheduleLater(index === 1) - }} - /> - - {scheduleLater && ( - - + { + setScheduleLater(index === 1) + }} /> - - + + {scheduleLater && ( + + + + + )} + + intl.formatMessage({ id: type.intlId})) + } + selectedOptionIndex={rewardTypeIndex} + handleOnChange={_handleRewardChange} + /> + + + {isCommunityPost && ( + + )} + )} - - intl.formatMessage({ id: type.intlId})) - } - selectedOptionIndex={rewardTypeIndex} - handleOnChange={_handleRewardChange} - /> - - - {isCommunityPost && ( - - )} - + - + {!isEdit && ( + + )} + @@ -190,8 +199,8 @@ const EditorSettingsModal = forwardRef(({ title={"Post Settings"} animationType="slide" style={styles.modalStyle} - > - {_renderContent} + > + {_renderContent} ); diff --git a/src/screens/editor/container/editorContainer.tsx b/src/screens/editor/container/editorContainer.tsx index d495daa60..2fd0f8a0d 100644 --- a/src/screens/editor/container/editorContainer.tsx +++ b/src/screens/editor/container/editorContainer.tsx @@ -758,7 +758,7 @@ class EditorContainer extends Component { _submitEdit = async (fields) => { const { currentAccount, pinCode } = this.props; - const { post, isEdit, isPostSending } = this.state; + const { post, isEdit, isPostSending, thumbIndex } = this.state; if (isPostSending) { return; @@ -784,7 +784,7 @@ class EditorContainer extends Component { newBody = patch; } - const meta = extractMetadata(fields.body); + const meta = extractMetadata(fields.body, thumbIndex); let jsonMeta = {}; diff --git a/src/screens/editor/screen/editorScreen.tsx b/src/screens/editor/screen/editorScreen.tsx index 46cd22cf0..cbdee9d91 100644 --- a/src/screens/editor/screen/editorScreen.tsx +++ b/src/screens/editor/screen/editorScreen.tsx @@ -464,6 +464,7 @@ class EditorScreen extends Component { ref={(componentRef) => (this.editorSettingsModalRef = componentRef)} body={fields.body} draftId={draftId} + isEdit={isEdit} isCommunityPost={selectedCommunity !== null} handleThumbSelection={this._handleOnThumbSelection} handleRewardChange={handleRewardChange}