From b0b50098a4079daa0622a1ff9b4c52774d1d1d9f Mon Sep 17 00:00:00 2001
From: Dessalines <tyhou13@gmx.com>
Date: Tue, 4 Feb 2020 11:19:05 -0500
Subject: Websocket reconnect reload page data. Fixes #504

---
 ui/src/components/main.tsx | 2 ++
 1 file changed, 2 insertions(+)

(limited to 'ui/src/components/main.tsx')

diff --git a/ui/src/components/main.tsx b/ui/src/components/main.tsx
index 6d3e1815..0970381b 100644
--- a/ui/src/components/main.tsx
+++ b/ui/src/components/main.tsx
@@ -537,6 +537,8 @@ export class Main extends Component<any, MainState> {
     if (msg.error) {
       toast(i18n.t(msg.error), 'danger');
       return;
+    } else if (msg.reconnect) {
+      this.fetchPosts();
     } else if (res.op == UserOperation.GetFollowedCommunities) {
       let data = res.data as GetFollowedCommunitiesResponse;
       this.state.subscribedCommunities = data.communities;
-- 
cgit v1.2.3

