summaryrefslogtreecommitdiffstats
path: root/ui/src/components/post.tsx
diff options
context:
space:
mode:
authorDessalines <tyhou13@gmx.com>2020-02-04 11:19:05 -0500
committerDessalines <tyhou13@gmx.com>2020-02-04 11:19:05 -0500
commitb0b50098a4079daa0622a1ff9b4c52774d1d1d9f (patch)
tree527c63d46ae091558d0195915972a6b81cf7963c /ui/src/components/post.tsx
parente4dfa5e52f911a6dbb5df41932a70dd9af3c9753 (diff)
Websocket reconnect reload page data. Fixes #504
Diffstat (limited to 'ui/src/components/post.tsx')
-rw-r--r--ui/src/components/post.tsx4
1 files changed, 4 insertions, 0 deletions
diff --git a/ui/src/components/post.tsx b/ui/src/components/post.tsx
index b0faf850..b399d3b2 100644
--- a/ui/src/components/post.tsx
+++ b/ui/src/components/post.tsx
@@ -370,6 +370,10 @@ export class Post extends Component<any, PostState> {
if (msg.error) {
toast(i18n.t(msg.error), 'danger');
return;
+ } else if (msg.reconnect) {
+ WebSocketService.Instance.getPost({
+ id: Number(this.props.match.params.id),
+ });
} else if (res.op == UserOperation.GetPost) {
let data = res.data as GetPostResponse;
this.state.post = data.post;