diff --git a/src/components/comments/container/commentsContainer.js b/src/components/comments/container/commentsContainer.js index 4169b242c..3d8565c8f 100644 --- a/src/components/comments/container/commentsContainer.js +++ b/src/components/comments/container/commentsContainer.js @@ -182,8 +182,8 @@ class CommentsContainer extends Component { }); }; - _handleCommentCopyAction = (index, selectedComment) => { - const { dispatch, intl } = this.props; + _handleOnPressCommentMenu = (index, selectedComment) => { + const { dispatch, intl, navigation } = this.props; switch (index) { case 0: @@ -197,6 +197,17 @@ class CommentsContainer extends Component { ); }); break; + case 1: + navigation.navigate({ + routeName: ROUTES.SCREENS.POST, + key: get(selectedComment, 'permlink'), + params: { + author: get(selectedComment, 'author'), + permlink: get(selectedComment, 'permlink'), + isHasParentPost: get(selectedComment, 'parent_permlink'), + }, + }); + break; default: break; @@ -236,7 +247,7 @@ class CommentsContainer extends Component { isLoggedIn={isLoggedIn} fetchPost={fetchPost} handleDeleteComment={this._handleDeleteComment} - handleCommentCopyAction={this._handleCommentCopyAction} + handleOnPressCommentMenu={this._handleOnPressCommentMenu} {...this.props} /> ); diff --git a/src/components/comments/view/commentsView.js b/src/components/comments/view/commentsView.js index d37fb8a5d..197947ca5 100644 --- a/src/components/comments/view/commentsView.js +++ b/src/components/comments/view/commentsView.js @@ -52,7 +52,7 @@ class CommentsView extends PureComponent { isShowSubComments, marginLeft, handleDeleteComment, - handleCommentCopyAction, + handleOnPressCommentMenu, handleOnVotersPress, intl, } = this.props; @@ -94,13 +94,16 @@ class CommentsView extends PureComponent { intl.formatMessage({ id: 'post.copy_link', }), + intl.formatMessage({ + id: 'post.open_thread', + }), intl.formatMessage({ id: 'alert.cancel', }), ]} title={get(selectedComment, 'summary')} - cancelButtonIndex={1} - onPress={index => handleCommentCopyAction(index, selectedComment)} + cancelButtonIndex={2} + onPress={index => handleOnPressCommentMenu(index, selectedComment)} /> ); diff --git a/src/config/locales/en-US.json b/src/config/locales/en-US.json index 5c7d974ca..cd291e49d 100644 --- a/src/config/locales/en-US.json +++ b/src/config/locales/en-US.json @@ -228,7 +228,8 @@ "removed_hint": "The post was removed by", "copy_link": "Copy Link", "reblogged": "reblogged by", - "sponsored": "SPONSORED" + "sponsored": "SPONSORED", + "open_thread": "Open Thread" }, "drafts": { "title": "Drafts",