加载消息和初次打开加载消息的页面置底优化?
This commit is contained in:
@@ -124,7 +124,7 @@ export default function ChatFragment({ target, showReturnButton, onReturnButtonC
|
|||||||
top: 10000000000,
|
top: 10000000000,
|
||||||
behavior: "smooth",
|
behavior: "smooth",
|
||||||
})
|
})
|
||||||
}, 300)
|
}, 500)
|
||||||
}
|
}
|
||||||
useAsyncEffect(getChatInfoAndInit, [target])
|
useAsyncEffect(getChatInfoAndInit, [target])
|
||||||
|
|
||||||
@@ -148,7 +148,7 @@ export default function ChatFragment({ target, showReturnButton, onReturnButtonC
|
|||||||
|
|
||||||
const oldest = messagesList[0]
|
const oldest = messagesList[0]
|
||||||
setMessagesList(returnMsgs.concat(messagesList))
|
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(() => {
|
React.useEffect(() => {
|
||||||
|
|||||||
Reference in New Issue
Block a user