diff --git a/src/app/components/feed/postlist/postlist.component.ts b/src/app/components/feed/postlist/postlist.component.ts index c5e4f52..bcb3afe 100644 --- a/src/app/components/feed/postlist/postlist.component.ts +++ b/src/app/components/feed/postlist/postlist.component.ts @@ -21,12 +21,16 @@ export class PostlistComponent implements OnInit { voteUp(pPost: Post) { this.feedService.upvote(pPost.id).subscribe(response => { - this.voteEvent.emit(true); }); + // this.voteEvent.emit(true); + pPost.userVote = response.json().data.vote; + }); } voteDown(pPost: Post) { this.feedService.downvote(pPost.id).subscribe(response => { - this.voteEvent.emit(true); }); + // this.voteEvent.emit(true); + pPost.userVote = response.json().data.vote; + }); } deletePost(pPost: Post) { diff --git a/src/app/components/group/group.component.html b/src/app/components/group/group.component.html index 55dfe65..d46c241 100644 --- a/src/app/components/group/group.component.html +++ b/src/app/components/group/group.component.html @@ -1,6 +1,30 @@