diff --git a/src/components/comments/container/commentsContainer.js b/src/components/comments/container/commentsContainer.js index 94cff2475..c79c9d782 100644 --- a/src/components/comments/container/commentsContainer.js +++ b/src/components/comments/container/commentsContainer.js @@ -196,7 +196,7 @@ class CommentsContainer extends Component { }; _handleOnPressCommentMenu = (index, selectedComment) => { - const { dispatch, intl, navigation } = this.props; + const { dispatch, intl, navigation, isOwnProfile } = this.props; switch (index) { case 0: @@ -211,6 +211,7 @@ class CommentsContainer extends Component { }); break; case 1: + case isOwnProfile: navigation.navigate({ routeName: ROUTES.SCREENS.POST, key: get(selectedComment, 'permlink'), @@ -241,6 +242,7 @@ class CommentsContainer extends Component { selectedFilter, mainAuthor, selectedPermlink: _selectedPermlink, + isOwnProfile, } = this.props; return ( @@ -261,6 +263,7 @@ class CommentsContainer extends Component { fetchPost={fetchPost} handleDeleteComment={this._handleDeleteComment} handleOnPressCommentMenu={this._handleOnPressCommentMenu} + isOwnProfile={isOwnProfile} /> ); } diff --git a/src/components/comments/view/commentsView.js b/src/components/comments/view/commentsView.js index 29e7b60ac..7411eda4a 100644 --- a/src/components/comments/view/commentsView.js +++ b/src/components/comments/view/commentsView.js @@ -55,9 +55,18 @@ class CommentsView extends Component { handleOnPressCommentMenu, handleOnVotersPress, intl, + isOwnProfile, } = this.props; const { selectedComment } = this.state; + const menuItems = isOwnProfile + ? [ + intl.formatMessage({ id: 'post.copy_link' }), + intl.formatMessage({ id: 'post.open_thread' }), + intl.formatMessage({ id: 'alert.cancel' }), + ] + : [intl.formatMessage({ id: 'post.copy_link' }), intl.formatMessage({ id: 'alert.cancel' })]; + return ( handleOnPressCommentMenu(index, selectedComment)} />