mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-02 11:15:35 +03:00
Fixed comment crash error
This commit is contained in:
parent
461223c543
commit
c1f7fafae9
@ -55,14 +55,14 @@ class CommentsContainer extends Component {
|
|||||||
};
|
};
|
||||||
|
|
||||||
_handleOnReplyPress = (item) => {
|
_handleOnReplyPress = (item) => {
|
||||||
const { navigation } = this.props;
|
const { navigation, fetchPost } = this.props;
|
||||||
|
|
||||||
navigation.navigate({
|
navigation.navigate({
|
||||||
routeName: ROUTES.SCREENS.EDITOR,
|
routeName: ROUTES.SCREENS.EDITOR,
|
||||||
params: {
|
params: {
|
||||||
isReply: true,
|
isReply: true,
|
||||||
post: item,
|
post: item,
|
||||||
fetchPost: this._getComments,
|
fetchPost,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@ -84,7 +84,13 @@ class CommentsContainer extends Component {
|
|||||||
render() {
|
render() {
|
||||||
const { comments: _comments } = this.state;
|
const { comments: _comments } = this.state;
|
||||||
const {
|
const {
|
||||||
isLoggedIn, commentCount, author, permlink, currentAccount, isProfilePreview, comments,
|
isLoggedIn,
|
||||||
|
commentCount,
|
||||||
|
author,
|
||||||
|
permlink,
|
||||||
|
currentAccount,
|
||||||
|
isProfilePreview,
|
||||||
|
comments,
|
||||||
} = this.props;
|
} = this.props;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -419,7 +419,7 @@ class EditorContainer extends Component {
|
|||||||
intl.formatMessage({
|
intl.formatMessage({
|
||||||
id: 'alert.fail',
|
id: 'alert.fail',
|
||||||
}),
|
}),
|
||||||
error,
|
error.message || error.toString(),
|
||||||
);
|
);
|
||||||
this.setState({ isPostSending: false });
|
this.setState({ isPostSending: false });
|
||||||
};
|
};
|
||||||
|
@ -346,6 +346,7 @@ class ProfileContainer extends Component {
|
|||||||
selectedQuickProfile={selectedQuickProfile}
|
selectedQuickProfile={selectedQuickProfile}
|
||||||
selectedUser={user}
|
selectedUser={user}
|
||||||
username={username}
|
username={username}
|
||||||
|
getReplies={this._getReplies}
|
||||||
/>
|
/>
|
||||||
</Fragment>
|
</Fragment>
|
||||||
);
|
);
|
||||||
|
@ -73,6 +73,7 @@ class ProfileScreen extends PureComponent {
|
|||||||
selectedQuickProfile,
|
selectedQuickProfile,
|
||||||
selectedUser,
|
selectedUser,
|
||||||
username,
|
username,
|
||||||
|
getReplies,
|
||||||
} = this.props;
|
} = this.props;
|
||||||
|
|
||||||
const { isSummaryOpen, collapsibleMoreHeight } = this.state;
|
const { isSummaryOpen, collapsibleMoreHeight } = this.state;
|
||||||
@ -182,7 +183,7 @@ class ProfileScreen extends PureComponent {
|
|||||||
>
|
>
|
||||||
{comments && comments.length > 0 ? (
|
{comments && comments.length > 0 ? (
|
||||||
<ScrollView>
|
<ScrollView>
|
||||||
<Comments isProfilePreview comments={comments} />
|
<Comments isProfilePreview comments={comments} fetchPost={getReplies} />
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
) : (
|
) : (
|
||||||
<NoPost
|
<NoPost
|
||||||
|
Loading…
Reference in New Issue
Block a user