Added open thread for replies and comments

This commit is contained in:
Mustafa Buyukcelebi 2019-08-29 22:53:41 +03:00
parent 54f12c8466
commit 8ab1989e5c
3 changed files with 22 additions and 7 deletions

View File

@ -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}
/>
);

View File

@ -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)}
/>
</Fragment>
);

View File

@ -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",