summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--webapp/stores/post_store.jsx6
1 files changed, 5 insertions, 1 deletions
diff --git a/webapp/stores/post_store.jsx b/webapp/stores/post_store.jsx
index 7a532fa2e..062997f2b 100644
--- a/webapp/stores/post_store.jsx
+++ b/webapp/stores/post_store.jsx
@@ -260,7 +260,11 @@ class PostStoreClass extends EventEmitter {
clearChannelVisibility(id, atBottom) {
this.makePostsInfo(id);
this.postsInfo[id].endVisible = Constants.POST_CHUNK_SIZE;
- this.postsInfo[id].atTop = false;
+ if (this.postsInfo[id].postList) {
+ this.postsInfo[id].atTop = this.postsInfo[id].atTop && Constants.POST_CHUNK_SIZE >= this.postsInfo[id].postList.order.length;
+ } else {
+ this.postsInfo[id].atTop = false;
+ }
this.postsInfo[id].atBottom = atBottom;
}