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

View File

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