diff --git a/app/actions/views/post.js b/app/actions/views/post.js index 75193d12a..17cb4bbfc 100644 --- a/app/actions/views/post.js +++ b/app/actions/views/post.js @@ -84,10 +84,6 @@ export function getPosts(channelId, page = 0, perPage = Posts.POST_CHUNK_SIZE) { const posts = Object.values(data.posts); const actions = []; - if (posts?.length || !postForChannel) { - actions.push(receivedPostsInChannel(data, channelId, page === 0, data.prev_post_id === '')); - } - if (posts?.length) { actions.push(receivedPosts(data)); const additional = await dispatch(getPostsAdditionalDataBatch(posts)); @@ -96,6 +92,10 @@ export function getPosts(channelId, page = 0, perPage = Posts.POST_CHUNK_SIZE) { } } + if (posts?.length || !postForChannel) { + actions.push(receivedPostsInChannel(data, channelId, page === 0, data.prev_post_id === '')); + } + dispatch(batchActions(actions)); return {data};