fix(frontend): stop offline conversation request loop

This commit is contained in:
2026-07-12 22:16:16 +08:00
parent f923791d39
commit b0bb7f0702
10 changed files with 152 additions and 12 deletions
@@ -97,6 +97,7 @@ const allChatList = useMapGetter('getAllStatusChats');
const unAssignedChatsList = useMapGetter('getUnAssignedChats');
const participatingChatsList = useMapGetter('getParticipatingChats');
const chatListLoading = useMapGetter('getChatListLoadingStatus');
const chatListError = useMapGetter('getChatListErrorStatus');
const activeInbox = useMapGetter('getSelectedInbox');
const conversationStats = useMapGetter('conversationStats/getStats');
const appliedFilters = useMapGetter('getAppliedConversationFiltersV2');
@@ -915,7 +916,13 @@ watch(chatLists, () => {
/>
<p
v-if="!chatListLoading && !conversationList.length"
v-if="chatListError"
class="flex overflow-auto justify-center items-center p-4 text-n-slate-11"
>
{{ $t('CHAT_LIST.LIST.ERROR') }}
</p>
<p
v-else-if="!chatListLoading && !conversationList.length"
class="flex overflow-auto justify-center items-center p-4"
>
{{ $t('CHAT_LIST.LIST.404') }}
@@ -933,6 +940,7 @@ watch(chatLists, () => {
<ConversationList
:conversation-list="conversationList"
:is-loading="chatListLoading"
:has-error="chatListError"
:show-end-of-list-message="showEndOfListMessage"
:label="label"
:team-id="teamId"
@@ -12,6 +12,7 @@ import wootConstants from 'dashboard/constants/globals';
const props = defineProps({
conversationList: { type: Array, default: () => [] },
isLoading: { type: Boolean, default: false },
hasError: { type: Boolean, default: false },
showEndOfListMessage: { type: Boolean, default: false },
label: { type: String, default: '' },
teamId: { type: [String, Number], default: 0 },
@@ -86,7 +87,7 @@ defineExpose({ conversationListRef });
{{ $t('CHAT_LIST.EOF') }}
</p>
<IntersectionObserver
v-else
v-else-if="!hasError"
:options="intersectionObserverOptions"
@observed="loadMoreConversations"
/>