From 1810ba7b7a0c5419b8ab96772d39a6a56a0faf14 Mon Sep 17 00:00:00 2001 From: "bohdan.konorin" Date: Tue, 10 Dec 2024 00:04:40 +0100 Subject: [PATCH] Fixed offset issue --- ui-desktop/src/renderer/src/components/chat/Chat.tsx | 2 +- .../src/renderer/src/store/utils/apiCallsHelper.tsx | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ui-desktop/src/renderer/src/components/chat/Chat.tsx b/ui-desktop/src/renderer/src/components/chat/Chat.tsx index d629a4d4..b0f73aeb 100644 --- a/ui-desktop/src/renderer/src/components/chat/Chat.tsx +++ b/ui-desktop/src/renderer/src/components/chat/Chat.tsx @@ -208,7 +208,7 @@ const Chat = (props) => { while(!bidsSpinWaitClosed.current) { await new Promise(resolve => setTimeout(resolve, 300)); } - setIsLoading(true); + setIsLoading(false); } const toggleDrawer = async () => { diff --git a/ui-desktop/src/renderer/src/store/utils/apiCallsHelper.tsx b/ui-desktop/src/renderer/src/store/utils/apiCallsHelper.tsx index 49916fcd..40bbcd4e 100644 --- a/ui-desktop/src/renderer/src/store/utils/apiCallsHelper.tsx +++ b/ui-desktop/src/renderer/src/store/utils/apiCallsHelper.tsx @@ -16,7 +16,7 @@ export const getSessionsByUser = async (url, user) => { } } - const limit = 20; + const limit = 50; let offset = 0; let sessions: any[] = []; let all = false; @@ -30,7 +30,7 @@ export const getSessionsByUser = async (url, user) => { all = true; } else { - offset++; + offset += limit; } } @@ -55,7 +55,7 @@ export const getBidsByModelId = async (url, modelId) => { } } - const limit = 20; + const limit = 50; let offset = 0; let bids: any[] = []; let all = false; @@ -69,7 +69,7 @@ export const getBidsByModelId = async (url, modelId) => { all = true; } else { - offset++; + offset += limit; } }