diff options
Diffstat (limited to 'webapp/utils/async_client.jsx')
-rw-r--r-- | webapp/utils/async_client.jsx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/webapp/utils/async_client.jsx b/webapp/utils/async_client.jsx index 74064169f..729160fe4 100644 --- a/webapp/utils/async_client.jsx +++ b/webapp/utils/async_client.jsx @@ -609,14 +609,13 @@ export function getPosts(id) { } const postList = PostStore.getAllPosts(channelId); + const latestPostTime = PostStore.getLatestPostFromPageTime(id); - if ($.isEmptyObject(postList) || postList.order.length < Constants.POST_CHUNK_SIZE) { + if ($.isEmptyObject(postList) || postList.order.length < Constants.POST_CHUNK_SIZE || latestPostTime === 0) { getPostsPage(channelId, Constants.POST_CHUNK_SIZE); return; } - const latestPostTime = PostStore.getLatestPostFromPageTime(id); - callTracker['getPosts_' + channelId] = utils.getTimestamp(); Client.getPosts( |