Visit User

Move to using visit user in all cases.
This commit is contained in:
James Graham
2023-08-27 19:05:55 +00:00
parent f5ad2ad162
commit 50e8b9ebf6
7 changed files with 21 additions and 57 deletions

View File

@@ -26,17 +26,7 @@ ColumnLayout {
Layout.alignment: Qt.AlignHCenter
onClicked: {
const popup = userDetailDialog.createObject(QQC2.ApplicationWindow.overlay, {
room: room,
user: room.getUser(room.directChatRemoteUser.id),
})
popup.closed.connect(() => {
userListItem.highlighted = false
})
if (roomDrawer.modal) {
roomDrawer.close()
}
popup.open()
RoomManager.visitUser(room.getUser(room.directChatRemoteUser.id).object, "mention")
}
contentItem: KirigamiComponents.Avatar {

View File

@@ -207,14 +207,7 @@ ListView {
onClicked: {
userDelegate.highlighted = true;
const popup = userDetailDialog.createObject(QQC2.ApplicationWindow.overlay, {
room: root.room,
user: root.room.getUser(userDelegate.userId)
});
popup.closed.connect(() => {
userDelegate.highlighted = false;
});
popup.open();
RoomManager.visitUser(room.getUser(userDelegate.userId).object, "mention")
}
contentItem: RowLayout {
@@ -258,11 +251,6 @@ ListView {
DirectChatDrawerHeader {}
}
Component {
id: userDetailDialog
UserDetailDialog {}
}
onRoomChanged: {
if (root.headerItem) {
root.headerItem.userListSearchField.text = "";