From 935c1606b73abfc0818ace748ddc49b4c66e8532 Mon Sep 17 00:00:00 2001 From: heimoshuiyu Date: Thu, 16 Mar 2023 13:04:32 +0800 Subject: [PATCH] fix del affect postBeginIndex --- src/app.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/app.tsx b/src/app.tsx index 20d3ac7..13778e9 100644 --- a/src/app.tsx +++ b/src/app.tsx @@ -327,6 +327,10 @@ export function App() { ) ) { chatStore.history.splice(i, 1); + chatStore.postBeginIndex = Math.max( + chatStore.postBeginIndex - 1, + 0 + ); setChatStore({ ...chatStore }); } }}