From 7bc5f4e863b14febf26bb447b5267216d9d8ce42 Mon Sep 17 00:00:00 2001
From: JoramWilander <jwawilander@gmail.com>
Date: Wed, 29 Jul 2015 11:30:54 -0400
Subject: reset number of posts to fetch on channel switch and fresh page load

---
 web/react/components/channel_loader.jsx | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

(limited to 'web/react/components/channel_loader.jsx')

diff --git a/web/react/components/channel_loader.jsx b/web/react/components/channel_loader.jsx
index b7cb248db..6b80f6012 100644
--- a/web/react/components/channel_loader.jsx
+++ b/web/react/components/channel_loader.jsx
@@ -8,6 +8,7 @@
 var BrowserStore = require('../stores/browser_store.jsx');
 var AsyncClient = require('../utils/async_client.jsx');
 var SocketStore = require('../stores/socket_store.jsx');
+var ChannelStore = require('../stores/channel_store.jsx');
 var Constants = require('../utils/constants.jsx');
 
 module.exports = React.createClass({
@@ -15,7 +16,7 @@ module.exports = React.createClass({
 
         /* Start initial aysnc loads */
         AsyncClient.getMe();
-        AsyncClient.getPosts(true);
+        AsyncClient.getPosts(true, ChannelStore.getCurrentId(), Constants.POST_CHUNK_SIZE);
         AsyncClient.getChannels(true, true);
         AsyncClient.getChannelExtraInfo(true);
         AsyncClient.findTeams();
-- 
cgit v1.2.3-1-g7c22

