summaryrefslogtreecommitdiffstats
path: root/webapp/stores
diff options
context:
space:
mode:
authorJoramWilander <jwawilander@gmail.com>2016-06-13 15:29:24 -0400
committerJoramWilander <jwawilander@gmail.com>2016-06-13 15:29:24 -0400
commit5af526c259d9c6477d67eb8f8a1e7b86270c7294 (patch)
tree97cc595107026a1f19d6fd6e35627dda23979aa3 /webapp/stores
parentbb5ca5a8780f9259306d881e85760de8b87ddea8 (diff)
parent974238231b9cdbd39a825ec8e9299fbb0b51f6b8 (diff)
downloadchat-5af526c259d9c6477d67eb8f8a1e7b86270c7294.tar.gz
chat-5af526c259d9c6477d67eb8f8a1e7b86270c7294.tar.bz2
chat-5af526c259d9c6477d67eb8f8a1e7b86270c7294.zip
Merge branch 'release-3.1'
Conflicts: webapp/components/create_comment.jsx
Diffstat (limited to 'webapp/stores')
-rw-r--r--webapp/stores/post_store.jsx2
-rw-r--r--webapp/stores/user_store.jsx2
2 files changed, 2 insertions, 2 deletions
diff --git a/webapp/stores/post_store.jsx b/webapp/stores/post_store.jsx
index 73cb60314..b77c7bd3c 100644
--- a/webapp/stores/post_store.jsx
+++ b/webapp/stores/post_store.jsx
@@ -552,7 +552,7 @@ PostStore.dispatchToken = AppDispatcher.register((payload) => {
switch (action.type) {
case ActionTypes.RECEIVED_POSTS: {
- const id = PostStore.currentFocusedPostId == null ? action.id : PostStore.currentFocusedPostId;
+ const id = PostStore.currentFocusedPostId !== null && action.isPost ? PostStore.currentFocusedPostId : action.id;
PostStore.storePosts(id, makePostListNonNull(action.post_list));
PostStore.checkBounds(id, action.numRequested, makePostListNonNull(action.post_list), action.before);
PostStore.emitChange();
diff --git a/webapp/stores/user_store.jsx b/webapp/stores/user_store.jsx
index f57ecf1cd..218a7f1db 100644
--- a/webapp/stores/user_store.jsx
+++ b/webapp/stores/user_store.jsx
@@ -104,7 +104,7 @@ class UserStoreClass extends EventEmitter {
this.currentUserId = user.id;
global.window.mm_current_user_id = this.currentUserId;
if (LocalizationStore.getLocale() !== user.locale) {
- GlobalActions.newLocalizationSelected(user.locale);
+ setTimeout(() => GlobalActions.newLocalizationSelected(user.locale), 0);
}
}