ui: 用户资料中进入对话, 连带上层对话框关闭
This commit is contained in:
@@ -145,6 +145,7 @@ export default function App() {
|
||||
myProfileDialogRef={myProfileDialogRef as any}
|
||||
user={myUserProfileCache} />
|
||||
<UserProfileDialog
|
||||
chatInfoDialogRef={chatInfoDialogRef as any}
|
||||
userProfileDialogRef={userProfileDialogRef as any}
|
||||
openChatFragment={openChatFragment}
|
||||
user={userInfo} />
|
||||
|
||||
@@ -169,6 +169,7 @@ export default function AppMobile() {
|
||||
myProfileDialogRef={myProfileDialogRef as any}
|
||||
user={myUserProfileCache} />
|
||||
<UserProfileDialog
|
||||
chatInfoDialogRef={chatInfoDialogRef as any}
|
||||
userProfileDialogRef={userProfileDialogRef as any}
|
||||
openChatFragment={openChatFragment}
|
||||
user={userInfo} />
|
||||
|
||||
@@ -11,12 +11,14 @@ import User from "../../api/client_data/User.ts"
|
||||
|
||||
interface Refs {
|
||||
userProfileDialogRef: React.MutableRefObject<Dialog>
|
||||
chatInfoDialogRef: React.MutableRefObject<Dialog>
|
||||
openChatFragment: (id: string) => void
|
||||
user: User
|
||||
}
|
||||
|
||||
export default function UserProfileDialog({
|
||||
userProfileDialogRef,
|
||||
chatInfoDialogRef,
|
||||
openChatFragment,
|
||||
user
|
||||
}: Refs) {
|
||||
@@ -51,6 +53,7 @@ export default function UserProfileDialog({
|
||||
|
||||
openChatFragment(re.data!.chat_id as string)
|
||||
userProfileDialogRef.current!.open = false
|
||||
chatInfoDialogRef.current!.open = false
|
||||
}}>对话</mdui-list-item>
|
||||
</mdui-list>
|
||||
</mdui-dialog>
|
||||
|
||||
Reference in New Issue
Block a user