From ff741740eebceb43b1d69b13d97ae7eed2aa32d1 Mon Sep 17 00:00:00 2001
From: Joram Wilander <jwawilander@gmail.com>
Date: Mon, 13 Feb 2017 09:27:28 -0500
Subject: Increase performance when receiving messages (#5375)

---
 webapp/root.jsx | 3 +++
 1 file changed, 3 insertions(+)

(limited to 'webapp/root.jsx')

diff --git a/webapp/root.jsx b/webapp/root.jsx
index b8fa4e6a2..93cfa5a38 100644
--- a/webapp/root.jsx
+++ b/webapp/root.jsx
@@ -11,7 +11,9 @@ import PDFJS from 'pdfjs-dist';
 import * as GlobalActions from 'actions/global_actions.jsx';
 import * as Websockets from 'actions/websocket_actions.jsx';
 import BrowserStore from 'stores/browser_store.jsx';
+import ChannelStore from 'stores/channel_store.jsx';
 import * as I18n from 'i18n/i18n.jsx';
+import * as AsyncClient from 'utils/async_client.jsx';
 
 // Import our styles
 import 'bootstrap-colorpicker/dist/css/bootstrap-colorpicker.css';
@@ -58,6 +60,7 @@ function preRenderSetup(callwhendone) {
     $(window).on('beforeunload',
          () => {
              BrowserStore.setLastServerVersion('');
+             AsyncClient.viewChannel('', ChannelStore.getCurrentId() || '');
              Websockets.close();
          }
     );
-- 
cgit v1.2.3-1-g7c22

