From 2c66d86e2686c09e56d7b65ab679ce929d499478 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Thu, 4 Apr 2019 23:26:38 -0700 Subject: Adding subscribe to communities. - Adding subscribe. Fixes #12. Fixes #27. --- ui/src/components/post.tsx | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'ui/src/components/post.tsx') diff --git a/ui/src/components/post.tsx b/ui/src/components/post.tsx index 0075e9df..2a870c4d 100644 --- a/ui/src/components/post.tsx +++ b/ui/src/components/post.tsx @@ -229,6 +229,11 @@ export class Post extends Component { this.state.post.community_id = res.community.id; this.state.post.community_name = res.community.name; this.setState(this.state); + } else if (op == UserOperation.FollowCommunity) { + let res: CommunityResponse = msg; + this.state.community.subscribed = res.community.subscribed; + this.state.community.number_of_subscribers = res.community.number_of_subscribers; + this.setState(this.state); } } -- cgit v1.2.3