只有不是对话成员时才不会加载消息呢

This commit is contained in:
CrescentLeaf
2025-10-19 15:18:16 +08:00
parent b824186c37
commit af55143292

View File

@@ -85,6 +85,7 @@ export default function ChatFragment({ target, showReturnButton, onReturnButtonC
const chatInfo = re.data as Chat
setChatInfo(chatInfo)
if (chatInfo.is_member)
await loadMore()
setTabItemSelected(chatInfo.is_member ? "Chat" : "RequestJoin")
@@ -272,6 +273,7 @@ export default function ChatFragment({ target, showReturnButton, onReturnButtonC
flexDirection: "column",
height: "100%",
}} onScroll={async (e) => {
if (!chatInfo.is_member) return
const scrollTop = (e.target as HTMLDivElement).scrollTop
if (scrollTop == 0 && !showLoadingMoreMessagesTip) {
setShowLoadingMoreMessagesTip(true)