mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-30 00:52:42 +03:00
passed comment text from quick modal to full editor
This commit is contained in:
parent
c1d027689f
commit
607fc807a2
@ -162,6 +162,7 @@ const QuickReplyModal = ({}: QuickReplyModalProps, ref) => {
|
||||
params: {
|
||||
isReply: true,
|
||||
post: selectedPost,
|
||||
quickReplyText: commentValue,
|
||||
},
|
||||
});
|
||||
sheetModalRef.current?.setModalVisible(false);
|
||||
|
@ -68,6 +68,7 @@ class EditorContainer extends Component {
|
||||
isEdit: false,
|
||||
isPostSending: false,
|
||||
isReply: false,
|
||||
quickReplyText: '',
|
||||
isUploading: false,
|
||||
post: null,
|
||||
uploadedImage: null,
|
||||
@ -87,6 +88,7 @@ class EditorContainer extends Component {
|
||||
const { currentAccount, navigation } = this.props;
|
||||
const username = currentAccount && currentAccount.name ? currentAccount.name : '';
|
||||
let isReply;
|
||||
let quickReplyText;
|
||||
let isEdit;
|
||||
let post;
|
||||
let _draft;
|
||||
@ -129,9 +131,10 @@ class EditorContainer extends Component {
|
||||
}
|
||||
|
||||
if (navigationParams.isReply) {
|
||||
({ isReply } = navigationParams);
|
||||
({ isReply, quickReplyText } = navigationParams);
|
||||
this.setState({
|
||||
isReply,
|
||||
quickReplyText
|
||||
});
|
||||
}
|
||||
|
||||
@ -1160,6 +1163,7 @@ class EditorContainer extends Component {
|
||||
isOpenCamera,
|
||||
isPostSending,
|
||||
isReply,
|
||||
quickReplyText,
|
||||
isUploading,
|
||||
post,
|
||||
uploadedImage,
|
||||
@ -1191,6 +1195,7 @@ class EditorContainer extends Component {
|
||||
isOpenCamera={isOpenCamera}
|
||||
isPostSending={isPostSending}
|
||||
isReply={isReply}
|
||||
quickReplyText={quickReplyText}
|
||||
isUploading={isUploading}
|
||||
post={post}
|
||||
saveCurrentDraft={this._saveCurrentDraft}
|
||||
|
@ -367,6 +367,7 @@ class EditorScreen extends Component {
|
||||
isLoggedIn,
|
||||
isPostSending,
|
||||
isReply,
|
||||
quickReplyText,
|
||||
isUploading,
|
||||
post,
|
||||
uploadedImage,
|
||||
@ -404,6 +405,8 @@ class EditorScreen extends Component {
|
||||
</Modal>
|
||||
);
|
||||
};
|
||||
console.log('fields :', fields);
|
||||
console.log('quickReplyText : ', quickReplyText);
|
||||
|
||||
return (
|
||||
<View style={globalStyles.defaultContainer}>
|
||||
@ -447,7 +450,7 @@ class EditorScreen extends Component {
|
||||
)}
|
||||
<MarkdownEditor
|
||||
componentID="body"
|
||||
draftBody={fields && fields.body}
|
||||
draftBody={quickReplyText ? quickReplyText : fields && fields.body}
|
||||
handleOnTextChange={this._setWordsCount}
|
||||
handleFormUpdate={this._handleFormUpdate}
|
||||
handleIsFormValid={this._handleIsFormValid}
|
||||
|
Loading…
Reference in New Issue
Block a user