Store posts for focus view in regular post store as well (#4913)
Этот коммит содержится в:
коммит произвёл
Christopher Speller
родитель
20b9954424
Коммит
3d15b3ec50
@@ -632,9 +632,12 @@ PostStore.dispatchToken = AppDispatcher.register((payload) => {
|
|||||||
|
|
||||||
switch (action.type) {
|
switch (action.type) {
|
||||||
case ActionTypes.RECEIVED_POSTS: {
|
case ActionTypes.RECEIVED_POSTS: {
|
||||||
const id = PostStore.currentFocusedPostId !== null && action.isPost ? PostStore.currentFocusedPostId : action.id;
|
if (PostStore.currentFocusedPostId !== null && action.isPost) {
|
||||||
PostStore.storePosts(id, makePostListNonNull(action.post_list), action.checkLatest);
|
PostStore.storePosts(PostStore.currentFocusedPostId, makePostListNonNull(action.post_list), action.checkLatest);
|
||||||
PostStore.checkBounds(id, action.numRequested, makePostListNonNull(action.post_list), action.before);
|
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();
|
PostStore.emitChange();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user