From 149dab239a59f49a026635e1c795f23b8e432f7c Mon Sep 17 00:00:00 2001 From: Sivin Varghese <64252451+iamsivin@users.noreply.github.com> Date: Mon, 16 Jun 2025 15:38:27 +0530 Subject: [PATCH] chore: Prevent count flicker on loading more conversations (#11726) --- app/javascript/dashboard/components/ChatList.vue | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/app/javascript/dashboard/components/ChatList.vue b/app/javascript/dashboard/components/ChatList.vue index b14a62f08..928eea7df 100644 --- a/app/javascript/dashboard/components/ChatList.vue +++ b/app/javascript/dashboard/components/ChatList.vue @@ -109,7 +109,6 @@ const advancedFilterTypes = ref( attributeName: t(`FILTER.ATTRIBUTES.${filter.attributeI18nKey}`), })) ); -const isInitialLoad = ref(false); const currentUser = useMapGetter('getCurrentUser'); const chatLists = useMapGetter('getFilteredConversations'); @@ -377,7 +376,6 @@ function setFiltersFromUISettings() { function emitConversationLoaded() { emit('conversationLoad'); - isInitialLoad.value = false; // [VITE] removing this since the library has changed // nextTick(() => { // // Addressing a known issue in the virtual list library where dynamically added items @@ -422,7 +420,6 @@ function onApplyFilter(payload) { foldersQuery.value = filterQueryGenerator(payload); store.dispatch('conversationPage/reset'); store.dispatch('emptyAllConversations'); - isInitialLoad.value = true; fetchFilteredConversations(payload); } @@ -577,7 +574,6 @@ function resetAndFetchData() { store.dispatch('conversationPage/reset'); store.dispatch('emptyAllConversations'); store.dispatch('clearConversationFilters'); - isInitialLoad.value = true; if (hasActiveFolders.value) { const payload = activeFolder.value.query; fetchSavedFilteredConversations(payload); @@ -858,7 +854,7 @@ watch(conversationFilters, (newVal, oldVal) => { :active-status="activeStatus" :is-on-expanded-layout="isOnExpandedLayout" :conversation-stats="conversationStats" - :is-list-loading="isInitialLoad" + :is-list-loading="chatListLoading && !conversationList.length" @add-folders="onClickOpenAddFoldersModal" @delete-folders="onClickOpenDeleteFoldersModal" @filters-modal="onToggleAdvanceFiltersModal"