diff --git a/src/lib/components/chat/Chat.svelte b/src/lib/components/chat/Chat.svelte index 2da9d1a8e..5a3f6f5ae 100644 --- a/src/lib/components/chat/Chat.svelte +++ b/src/lib/components/chat/Chat.svelte @@ -421,7 +421,7 @@ files: chatFiles }); await chats.set( - await getChatList(localStorage.token, 0, $pageSkip * $pageLimit || $pageLimit) + await getChatList(localStorage.token, 0, ($pageSkip * $pageLimit) || $pageLimit) ); } } @@ -469,7 +469,7 @@ files: chatFiles }); await chats.set( - await getChatList(localStorage.token, 0, $pageSkip * $pageLimit || $pageLimit) + await getChatList(localStorage.token, 0, ($pageSkip * $pageLimit) || $pageLimit) ); } } @@ -631,7 +631,7 @@ timestamp: Date.now() }); await chats.set( - await getChatList(localStorage.token, 0, $pageSkip * $pageLimit || $pageLimit) + await getChatList(localStorage.token, 0, ($pageSkip * $pageLimit) || $pageLimit) ); await chatId.set(chat.id); } else { @@ -708,7 +708,7 @@ }) ); - await chats.set(await getChatList(localStorage.token, 0, $pageSkip * $pageLimit || $pageLimit)); + await chats.set(await getChatList(localStorage.token, 0, ($pageSkip * $pageLimit) || $pageLimit)); return _responses; }; diff --git a/src/lib/components/chat/Messages.svelte b/src/lib/components/chat/Messages.svelte index c798de923..8d8e3205e 100644 --- a/src/lib/components/chat/Messages.svelte +++ b/src/lib/components/chat/Messages.svelte @@ -90,7 +90,7 @@ history: history }); - await chats.set(await getChatList(localStorage.token, 0, $pageSkip * $pageLimit || $pageLimit)); + await chats.set(await getChatList(localStorage.token, 0, ($pageSkip * $pageLimit) || $pageLimit)); }; const confirmEditResponseMessage = async (messageId, content) => { diff --git a/src/lib/components/chat/Tags.svelte b/src/lib/components/chat/Tags.svelte index dd179d6d2..af4dbe41b 100644 --- a/src/lib/components/chat/Tags.svelte +++ b/src/lib/components/chat/Tags.svelte @@ -59,7 +59,7 @@ await pinnedChats.set(await getChatListByTagName(localStorage.token, 'pinned')); } else { await chats.set( - await getChatList(localStorage.token, 0, $pageSkip * $pageLimit || $pageLimit) + await getChatList(localStorage.token, 0, ($pageSkip * $pageLimit) || $pageLimit) ); } @@ -68,7 +68,7 @@ } } else { await chats.set( - await getChatList(localStorage.token, 0, $pageSkip * $pageLimit || $pageLimit) + await getChatList(localStorage.token, 0, ($pageSkip * $pageLimit) || $pageLimit) ); await pinnedChats.set(await getChatListByTagName(localStorage.token, 'pinned')); } diff --git a/src/lib/components/layout/Sidebar/ChatItem.svelte b/src/lib/components/layout/Sidebar/ChatItem.svelte index a107a5f31..ae9558b98 100644 --- a/src/lib/components/layout/Sidebar/ChatItem.svelte +++ b/src/lib/components/layout/Sidebar/ChatItem.svelte @@ -49,7 +49,7 @@ title: _title }); await chats.set( - await getChatList(localStorage.token, 0, $pageSkip * $pageLimit || $pageLimit) + await getChatList(localStorage.token, 0, ($pageSkip * $pageLimit) || $pageLimit) ); await pinnedChats.set(await getChatListByTagName(localStorage.token, 'pinned')); } @@ -64,7 +64,7 @@ if (res) { goto(`/c/${res.id}`); await chats.set( - await getChatList(localStorage.token, 0, $pageSkip * $pageLimit || $pageLimit) + await getChatList(localStorage.token, 0, ($pageSkip * $pageLimit) || $pageLimit) ); await pinnedChats.set(await getChatListByTagName(localStorage.token, 'pinned')); } @@ -72,7 +72,7 @@ const archiveChatHandler = async (id) => { await archiveChatById(localStorage.token, id); - await chats.set(await getChatList(localStorage.token, 0, $pageSkip * $pageLimit || $pageLimit)); + await chats.set(await getChatList(localStorage.token, 0, ($pageSkip * $pageLimit) || $pageLimit)); await pinnedChats.set(await getChatListByTagName(localStorage.token, 'pinned')); };