summaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
authorJoramWilander <jwawilander@gmail.com>2015-08-27 12:56:15 -0400
committerJoramWilander <jwawilander@gmail.com>2015-08-27 12:56:15 -0400
commita6c7fe76a5f4a0153654cff5cae43e14d794e287 (patch)
tree2b631af1b8dcbe618b5c950547f0372581aa5fd3 /web
parent305a74c78d25a9e8fd6a5d03a8431c160226e1f4 (diff)
downloadchat-a6c7fe76a5f4a0153654cff5cae43e14d794e287.tar.gz
chat-a6c7fe76a5f4a0153654cff5cae43e14d794e287.tar.bz2
chat-a6c7fe76a5f4a0153654cff5cae43e14d794e287.zip
If we don't have any posts for a channel, pull page rather than pulling latest.
Diffstat (limited to 'web')
-rw-r--r--web/react/utils/async_client.jsx5
1 files changed, 5 insertions, 0 deletions
diff --git a/web/react/utils/async_client.jsx b/web/react/utils/async_client.jsx
index 4b0b90dc7..c03a0230b 100644
--- a/web/react/utils/async_client.jsx
+++ b/web/react/utils/async_client.jsx
@@ -412,6 +412,11 @@ function getPosts(id) {
return;
}
+ if (PostStore.getCurrentPosts() == null) {
+ module.exports.getPostsPage(true, id, Constants.POST_CHUNK_SIZE);
+ return;
+ }
+
var latestUpdate = PostStore.getLatestUpdate(channelId);
callTracker['getPosts_' + channelId] = utils.getTimestamp();