mirror of
https://github.com/nagisa77/OpenIsle.git
synced 2026-02-06 23:21:16 +08:00
Merge pull request #822 from nagisa77/codex/fix-channel-ui-scroll-behavior
fix: scroll to bottom when entering channel
This commit is contained in:
@@ -371,11 +371,12 @@ watch(isConnected, (newValue) => {
|
||||
})
|
||||
|
||||
onActivated(async () => {
|
||||
// 返回页面时:刷新数据与已读,不做强制滚动,保持用户当前位置
|
||||
// 返回页面时:刷新数据与已读,并滚动到底部
|
||||
if (currentUser.value) {
|
||||
await fetchMessages(0)
|
||||
await markConversationAsRead()
|
||||
await nextTick()
|
||||
scrollToBottomSmooth()
|
||||
updateNearBottom()
|
||||
if (!isConnected.value) {
|
||||
const token = getToken()
|
||||
|
||||
Reference in New Issue
Block a user