From e23084ba1debc37686abc46789b20ab813151474 Mon Sep 17 00:00:00 2001 From: Joram Wilander Date: Tue, 31 May 2016 10:52:55 -0400 Subject: Reset channel top visibility correctly to fix intro message after tutorial (#3159) --- webapp/stores/post_store.jsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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; } -- cgit v1.2.3-1-g7c22