diff options
author | Joram Wilander <jwawilander@gmail.com> | 2016-05-31 10:52:55 -0400 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2016-05-31 10:52:55 -0400 |
commit | e23084ba1debc37686abc46789b20ab813151474 (patch) | |
tree | 157a8cb4396c8e31a6690264d846c963d23fa6ee /webapp/stores/post_store.jsx | |
parent | c226cabc048a4e33e956346523e4605e85979d08 (diff) | |
download | chat-e23084ba1debc37686abc46789b20ab813151474.tar.gz chat-e23084ba1debc37686abc46789b20ab813151474.tar.bz2 chat-e23084ba1debc37686abc46789b20ab813151474.zip |
Reset channel top visibility correctly to fix intro message after tutorial (#3159)
Diffstat (limited to 'webapp/stores/post_store.jsx')
-rw-r--r-- | webapp/stores/post_store.jsx | 6 |
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; } |