summaryrefslogtreecommitdiffstats
path: root/webapp/stores/post_store.jsx
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2016-12-29 15:50:17 -0500
committerChristopher Speller <crspeller@gmail.com>2016-12-29 15:50:17 -0500
commit3d15b3ec50a7476afb38b4305c24efa6fc80753a (patch)
tree5a60ce9abdd82e1a0f957f6195fcead63190ba64 /webapp/stores/post_store.jsx
parent20b995442488f321cebad064d2488fdcf4c62899 (diff)
downloadchat-3d15b3ec50a7476afb38b4305c24efa6fc80753a.tar.gz
chat-3d15b3ec50a7476afb38b4305c24efa6fc80753a.tar.bz2
chat-3d15b3ec50a7476afb38b4305c24efa6fc80753a.zip
Store posts for focus view in regular post store as well (#4913)
Diffstat (limited to 'webapp/stores/post_store.jsx')
-rw-r--r--webapp/stores/post_store.jsx9
1 files changed, 6 insertions, 3 deletions
diff --git a/webapp/stores/post_store.jsx b/webapp/stores/post_store.jsx
index 5e8155c40..4f213ce28 100644
--- a/webapp/stores/post_store.jsx
+++ b/webapp/stores/post_store.jsx
@@ -632,9 +632,12 @@ PostStore.dispatchToken = AppDispatcher.register((payload) => {
switch (action.type) {
case ActionTypes.RECEIVED_POSTS: {
- const id = PostStore.currentFocusedPostId !== null && action.isPost ? PostStore.currentFocusedPostId : action.id;
- PostStore.storePosts(id, makePostListNonNull(action.post_list), action.checkLatest);
- PostStore.checkBounds(id, action.numRequested, makePostListNonNull(action.post_list), action.before);
+ if (PostStore.currentFocusedPostId !== null && action.isPost) {
+ PostStore.storePosts(PostStore.currentFocusedPostId, makePostListNonNull(action.post_list), action.checkLatest);
+ PostStore.checkBounds(PostStore.currentFocusedPostId, action.numRequested, makePostListNonNull(action.post_list), action.before);
+ }
+ PostStore.storePosts(action.id, makePostListNonNull(action.post_list), action.checkLatest);
+ PostStore.checkBounds(action.id, action.numRequested, makePostListNonNull(action.post_list), action.before);
PostStore.emitChange();
break;
}