mirror of
https://github.com/mattermost/focalboard.git
synced 2024-11-24 08:22:29 +02:00
Optimised Sorting of comments inside cards (#4207)
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
This commit is contained in:
parent
0f5f4b0590
commit
09e0f045a7
@ -58,9 +58,9 @@ const commentsSlice = createSlice({
|
||||
state.comments[block.id] = block as CommentBlock
|
||||
state.commentsByCard[block.parentId] = state.commentsByCard[block.parentId] || []
|
||||
state.commentsByCard[block.parentId].push(block as CommentBlock)
|
||||
state.commentsByCard[block.parentId].sort((a, b) => a.createAt - b.createAt)
|
||||
}
|
||||
}
|
||||
Object.values(state.commentsByCard).forEach((comment) => comment.sort((a, b) => a.createAt - b.createAt))
|
||||
})
|
||||
builder.addCase(loadBoardData.fulfilled, (state, action) => {
|
||||
state.comments = {}
|
||||
@ -70,9 +70,9 @@ const commentsSlice = createSlice({
|
||||
state.comments[block.id] = block as CommentBlock
|
||||
state.commentsByCard[block.parentId] = state.commentsByCard[block.parentId] || []
|
||||
state.commentsByCard[block.parentId].push(block as CommentBlock)
|
||||
state.commentsByCard[block.parentId].sort((a, b) => a.createAt - b.createAt)
|
||||
}
|
||||
}
|
||||
Object.values(state.commentsByCard).forEach((comment) => comment.sort((a, b) => a.createAt - b.createAt))
|
||||
})
|
||||
},
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user