fix: #2615 scrollbar jitter under certain message counts

This commit is contained in:
Yidadaa 2023-08-14 22:11:38 +08:00
parent e8e01aa60d
commit db5c7aba78
1 changed files with 1 additions and 1 deletions

View File

@ -940,7 +940,7 @@ function _Chat() {
const prevPageMsgIndex = msgRenderIndex - CHAT_PAGE_SIZE; const prevPageMsgIndex = msgRenderIndex - CHAT_PAGE_SIZE;
const nextPageMsgIndex = msgRenderIndex + CHAT_PAGE_SIZE; const nextPageMsgIndex = msgRenderIndex + CHAT_PAGE_SIZE;
if (isTouchTopEdge) { if (isTouchTopEdge && !isTouchBottomEdge) {
setMsgRenderIndex(prevPageMsgIndex); setMsgRenderIndex(prevPageMsgIndex);
} else if (isTouchBottomEdge) { } else if (isTouchBottomEdge) {
setMsgRenderIndex(nextPageMsgIndex); setMsgRenderIndex(nextPageMsgIndex);