fix: a search in Shared Chats or a user's Chats loads more than the first 60 results (#32675)

This commit is contained in:
G30 authored and GitHub committed 2026-10-21 02:25:39 +09:00
1 parent ab6976b5bf
commit 0f2d1af1ce
2 files changed
+4 -12

No files matched your search

@@ -56,17 +56,13 @@
if (query === '') {
chatList = await getChatListByUserId(localStorage.token, user.id, page, filter);
allChatsLoaded = (chatList ?? []).length === 0;
} else {
searchDebounceTimeout = setTimeout(async () => {
chatList = await getChatListByUserId(localStorage.token, user.id, page, filter);
allChatsLoaded = (chatList ?? []).length === 0;
}, 500);
}
if ((chatList ?? []).length === 0) {
allChatsLoaded = true;
} else {
allChatsLoaded = false;
}
};
const loadMoreChats = async () => {
@@ -52,17 +52,13 @@
if (query === '') {
chatList = await getSharedChatList(localStorage.token, page, filter);
allChatsLoaded = (chatList ?? []).length === 0;
} else {
searchDebounceTimeout = setTimeout(async () => {
chatList = await getSharedChatList(localStorage.token, page, filter);
allChatsLoaded = (chatList ?? []).length === 0;
}, 500);
}
if ((chatList ?? []).length === 0) {
allChatsLoaded = true;
} else {
allChatsLoaded = false;
}
};
const loadMoreChats = async () => {