feat: clip conversation list before rendering

This commit is contained in:
Shivam Mishra
2025-10-01 16:52:54 +05:30
parent ecff66146a
commit 77832436f3
2 changed files with 6 additions and 2 deletions
@@ -249,7 +249,7 @@ const activeAssigneeTabCount = computed(() => {
});
const conversationListPagination = computed(() => {
const conversationsPerPage = 25;
const conversationsPerPage = wootConstants.CONVERSATIONS_PER_PAGE;
const hasChatsOnView =
chatsOnView.value &&
Array.isArray(chatsOnView.value) &&
@@ -339,7 +339,10 @@ const conversationList = computed(() => {
});
}
return localConversationList;
// Clip to current page size to fix pagination order bug
const maxItems =
currentFiltersPage.value * wootConstants.CONVERSATIONS_PER_PAGE;
return localConversationList.slice(0, maxItems);
});
const showEndOfListMessage = computed(() => {
@@ -1,5 +1,6 @@
export default {
GRAVATAR_URL: 'https://www.gravatar.com/avatar/',
CONVERSATIONS_PER_PAGE: 25,
ASSIGNEE_TYPE: {
ME: 'me',
UNASSIGNED: 'unassigned',