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