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 2026-10-20 13:25:39 -04:00 • committed by GitHub
parent ab6976b5bf
commit 0f2d1af1ce
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 12 deletions

View file

@ -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 () => {

View file

@ -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 () => {