mirror of
https://github.com/nagisa77/OpenIsle.git
synced 2026-06-07 02:27:34 +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 () => {
|
onActivated(async () => {
|
||||||
// 返回页面时:刷新数据与已读,不做强制滚动,保持用户当前位置
|
// 返回页面时:刷新数据与已读,并滚动到底部
|
||||||
if (currentUser.value) {
|
if (currentUser.value) {
|
||||||
await fetchMessages(0)
|
await fetchMessages(0)
|
||||||
await markConversationAsRead()
|
await markConversationAsRead()
|
||||||
await nextTick()
|
await nextTick()
|
||||||
|
scrollToBottomSmooth()
|
||||||
updateNearBottom()
|
updateNearBottom()
|
||||||
if (!isConnected.value) {
|
if (!isConnected.value) {
|
||||||
const token = getToken()
|
const token = getToken()
|
||||||
|
|||||||
Reference in New Issue
Block a user