diff options
author | Dessalines <tyhou13@gmx.com> | 2020-02-02 12:45:41 -0500 |
---|---|---|
committer | Dessalines <tyhou13@gmx.com> | 2020-02-02 12:45:41 -0500 |
commit | 96a7e99e57f8c79eead599e6de5d94016f7021e6 (patch) | |
tree | 3447364e73f461660c0db87cd2f45ddea16a50ee /ui/src/components/post.tsx | |
parent | cda1e6e74141efea556e81082a3468a012d2926d (diff) |
Removing PostLikeResponse in favor of PostResponse. Consolidating comment and post_sends.
Diffstat (limited to 'ui/src/components/post.tsx')
-rw-r--r-- | ui/src/components/post.tsx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/ui/src/components/post.tsx b/ui/src/components/post.tsx index fcf79438..b53d7d4f 100644 --- a/ui/src/components/post.tsx +++ b/ui/src/components/post.tsx @@ -11,7 +11,6 @@ import { CommentForm as CommentFormI, CommentResponse, CommentSortType, - CreatePostLikeResponse, CommunityUser, CommunityResponse, CommentNode as CommentNodeI, @@ -401,8 +400,8 @@ export class Post extends Component<any, PostState> { } else if (res.op == UserOperation.CreateComment) { let data = res.data as CommentResponse; - // Necessary since a user might receive a comment reply on another thread - if (data.comment.post_id == this.state.post.id) { + // Necessary since it might be a user reply + if (data.recipient_ids.length == 0) { this.state.comments.unshift(data.comment); this.setState(this.state); } @@ -439,7 +438,7 @@ export class Post extends Component<any, PostState> { } this.setState(this.state); } else if (res.op == UserOperation.CreatePostLike) { - let data = res.data as CreatePostLikeResponse; + let data = res.data as PostResponse; this.state.post.score = data.post.score; this.state.post.upvotes = data.post.upvotes; this.state.post.downvotes = data.post.downvotes; |