diff options
author | Dessalines <tyhou13@gmx.com> | 2019-04-04 23:26:38 -0700 |
---|---|---|
committer | Dessalines <tyhou13@gmx.com> | 2019-04-04 23:26:38 -0700 |
commit | 2c66d86e2686c09e56d7b65ab679ce929d499478 (patch) | |
tree | 8d4f2fb0e95ba245a58b8730bb5fd89967e2e69c /ui/src/components/post.tsx | |
parent | 6a3bea1f50137993c74f8c38e417892929022234 (diff) |
Adding subscribe to communities.
- Adding subscribe. Fixes #12. Fixes #27.
Diffstat (limited to 'ui/src/components/post.tsx')
-rw-r--r-- | ui/src/components/post.tsx | 5 |
1 files changed, 5 insertions, 0 deletions
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<any, PostState> { 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); } } |