mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-22 04:41:43 +03:00
Added open thread for replies and comments
This commit is contained in:
parent
ef5cde4d99
commit
caee685ec2
@ -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}
|
||||
/>
|
||||
);
|
||||
|
@ -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>
|
||||
);
|
||||
|
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user