Merge pull request #1107 from esteemapp/feature/mention-parent-post

created mention parent posts feature
This commit is contained in:
Mustafa Buyukcelebi 2019-08-29 09:01:19 +03:00 committed by GitHub
commit b2bee19402
3 changed files with 4 additions and 2 deletions

View File

@ -341,6 +341,7 @@ class ApplicationContainer extends Component {
params = { params = {
author: get(push, 'source', ''), author: get(push, 'source', ''),
permlink: fullPermlink, permlink: fullPermlink,
isHasParentPost: true,
}; };
key = fullPermlink; key = fullPermlink;
routeName = ROUTES.SCREENS.POST; routeName = ROUTES.SCREENS.POST;

View File

@ -93,7 +93,7 @@ class NotificationContainer extends Component {
params = { params = {
author, author,
permlink, permlink,
isHasParentPost: get(data, 'parent_permlink'), isHasParentPost: get(data, 'parent_permlink') || get(data, 'type') === 'mention',
}; };
} else if (type === 'follow') { } else if (type === 'follow') {
routeName = ROUTES.SCREENS.PROFILE; routeName = ROUTES.SCREENS.PROFILE;

View File

@ -96,8 +96,9 @@ class PostContainer extends Component {
author, author,
} = this.state; } = this.state;
if (isHasParentPost && post) if (isHasParentPost && post && get(post, 'parent_author') && get(post, 'parent_permlink')) {
this._loadPost(get(post, 'parent_author'), get(post, 'parent_permlink'), true); this._loadPost(get(post, 'parent_author'), get(post, 'parent_permlink'), true);
}
return ( return (
<PostScreen <PostScreen