diff options
author | JoramWilander <jwawilander@gmail.com> | 2015-08-27 12:56:15 -0400 |
---|---|---|
committer | JoramWilander <jwawilander@gmail.com> | 2015-08-27 12:56:15 -0400 |
commit | a6c7fe76a5f4a0153654cff5cae43e14d794e287 (patch) | |
tree | 2b631af1b8dcbe618b5c950547f0372581aa5fd3 /web/react | |
parent | 305a74c78d25a9e8fd6a5d03a8431c160226e1f4 (diff) | |
download | chat-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/react')
-rw-r--r-- | web/react/utils/async_client.jsx | 5 |
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(); |