From 706a34040717980a66f763f7b47cf737e4f5a8a2 Mon Sep 17 00:00:00 2001 From: CrescentLeaf Date: Tue, 30 Sep 2025 21:54:25 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=9C=A8=E6=B2=92=E6=9C=89=E6=B6=88?= =?UTF-8?q?=E6=81=AF=E6=99=82,=20=E7=99=BC=E9=80=81=E6=B6=88=E6=81=AF?= =?UTF-8?q?=E4=B8=A6=E6=8B=89=E5=8F=96=E5=B0=8E=E8=87=B4=E7=9A=84=E6=B6=88?= =?UTF-8?q?=E6=81=AF=E9=87=8D=E8=A4=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/ui/chat/ChatFragment.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/client/ui/chat/ChatFragment.tsx b/client/ui/chat/ChatFragment.tsx index d19b457..a5d8a36 100644 --- a/client/ui/chat/ChatFragment.tsx +++ b/client/ui/chat/ChatFragment.tsx @@ -82,6 +82,7 @@ export default function ChatFragment({ target, showReturnButton, onReturnButtonC if (checkApiSuccessOrSncakbar(re, "拉取歷史記錄失敗")) return const returnMsgs = (re.data!.messages as Message[]).reverse() + page.current++ if (returnMsgs.length == 0) { setShowNoMoreMessagesTip(true) setTimeout(() => setShowNoMoreMessagesTip(false), 1000) @@ -91,8 +92,6 @@ export default function ChatFragment({ target, showReturnButton, onReturnButtonC const oldest = messagesList[0] setMessagesList(returnMsgs.concat(messagesList)) setTimeout(() => chatPanelRef.current!.scrollTo({ top: $(`#chat_${target}_message_${oldest.id}`).get(0).offsetTop, behavior: 'smooth' }), 100) - - page.current++ } React.useEffect(() => {