mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-22 04:41:43 +03:00
Fixed comment deep link issue
This commit is contained in:
parent
11d321889e
commit
0be5c10ec2
@ -181,6 +181,7 @@ class ApplicationContainer extends Component {
|
||||
let params;
|
||||
let content;
|
||||
let profile;
|
||||
let isHasParentPost = false;
|
||||
const { currentAccount, dispatch } = this.props;
|
||||
const { isIos } = this.state;
|
||||
|
||||
@ -215,18 +216,15 @@ class ApplicationContainer extends Component {
|
||||
if (author && permlink) {
|
||||
await getPost(author, permlink, currentAccount.name)
|
||||
.then(result => {
|
||||
if (get(result, 'title')) {
|
||||
content = result;
|
||||
} else {
|
||||
this._handleAlert('deep_link.no_existing_post');
|
||||
}
|
||||
content = result;
|
||||
isHasParentPost = get(result, 'parent_permlink');
|
||||
})
|
||||
.catch(() => {
|
||||
this._handleAlert('deep_link.no_existing_post');
|
||||
});
|
||||
|
||||
routeName = ROUTES.SCREENS.POST;
|
||||
params = { content };
|
||||
params = { content, isHasParentPost };
|
||||
} else if (author) {
|
||||
profile = await getUser(author);
|
||||
|
||||
|
@ -43,8 +43,8 @@ class PostContainer extends Component {
|
||||
} else if (author && permlink) {
|
||||
this._loadPost(author, permlink);
|
||||
this.setState({ author });
|
||||
if (isHasParentPost) this.setState({ isHasParentPost });
|
||||
}
|
||||
if (isHasParentPost) this.setState({ isHasParentPost });
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps) {
|
||||
|
Loading…
Reference in New Issue
Block a user