mirror of
https://github.com/nagisa77/OpenIsle.git
synced 2026-03-17 01:20:46 +08:00
fix: scroll channel to bottom on activation
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