加载消息和初次打开加载消息的页面置底优化?

This commit is contained in:
CrescentLeaf
2025-11-09 16:34:45 +08:00
parent 2f85aef136
commit df217b167e

View File

@@ -124,7 +124,7 @@ export default function ChatFragment({ target, showReturnButton, onReturnButtonC
top: 10000000000,
behavior: "smooth",
})
}, 300)
}, 500)
}
useAsyncEffect(getChatInfoAndInit, [target])
@@ -148,7 +148,7 @@ 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)
setTimeout(() => chatPanelRef.current!.scrollTo({ top: $(`#chat_${target}_message_${oldest.id}`).get(0).offsetTop }), 200)
}
React.useEffect(() => {