Visit User
Move to using visit user in all cases.
This commit is contained in:
@@ -375,10 +375,7 @@ ColumnLayout {
|
|||||||
MouseArea {
|
MouseArea {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
onClicked: {
|
onClicked: {
|
||||||
userDetailDialog.createObject(QQC2.ApplicationWindow.overlay, {
|
RoomManager.visitUser(root.author.object, "mention")
|
||||||
room: currentRoom,
|
|
||||||
user: root.author
|
|
||||||
}).open();
|
|
||||||
}
|
}
|
||||||
cursorShape: Qt.PointingHandCursor
|
cursorShape: Qt.PointingHandCursor
|
||||||
}
|
}
|
||||||
@@ -459,10 +456,7 @@ ColumnLayout {
|
|||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
cursorShape: Qt.PointingHandCursor
|
cursorShape: Qt.PointingHandCursor
|
||||||
onClicked: {
|
onClicked: {
|
||||||
userDetailDialog.createObject(QQC2.ApplicationWindow.overlay, {
|
RoomManager.visitUser(root.author.object, "mention")
|
||||||
room: currentRoom,
|
|
||||||
user: root.author
|
|
||||||
}).open();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -222,12 +222,6 @@ QQC2.ScrollView {
|
|||||||
FileDelegateContextMenu {}
|
FileDelegateContextMenu {}
|
||||||
}
|
}
|
||||||
|
|
||||||
Component {
|
|
||||||
id: userDetailDialog
|
|
||||||
|
|
||||||
UserDetailDialog {}
|
|
||||||
}
|
|
||||||
|
|
||||||
TypingPane {
|
TypingPane {
|
||||||
id: typingPane
|
id: typingPane
|
||||||
visible: root.currentRoom && root.currentRoom.usersTyping.length > 0
|
visible: root.currentRoom && root.currentRoom.usersTyping.length > 0
|
||||||
@@ -445,11 +439,4 @@ QQC2.ScrollView {
|
|||||||
function positionViewAtBeginning() {
|
function positionViewAtBeginning() {
|
||||||
messageListView.positionViewAtBeginning()
|
messageListView.positionViewAtBeginning()
|
||||||
}
|
}
|
||||||
|
|
||||||
function showUserDetail(user) {
|
|
||||||
userDetailDialog.createObject(QQC2.ApplicationWindow.overlay, {
|
|
||||||
room: root.currentRoom,
|
|
||||||
user: root.currentRoom.getUser(user.id),
|
|
||||||
}).open();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -189,7 +189,22 @@ Kirigami.Page {
|
|||||||
banner.visible = true;
|
banner.visible = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Connections {
|
||||||
|
target: RoomManager
|
||||||
|
function onShowUserDetail(user) {
|
||||||
|
root.showUserDetail(user)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function showUserDetail(user) {
|
function showUserDetail(user) {
|
||||||
timelineViewLoader.item.showUserDetail(user)
|
userDetailDialog.createObject(QQC2.ApplicationWindow.overlay, {
|
||||||
|
room: root.currentRoom,
|
||||||
|
user: root.currentRoom.getUser(user.id),
|
||||||
|
}).open();
|
||||||
|
}
|
||||||
|
|
||||||
|
Component {
|
||||||
|
id: userDetailDialog
|
||||||
|
UserDetailDialog {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,17 +26,7 @@ ColumnLayout {
|
|||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
const popup = userDetailDialog.createObject(QQC2.ApplicationWindow.overlay, {
|
RoomManager.visitUser(room.getUser(room.directChatRemoteUser.id).object, "mention")
|
||||||
room: room,
|
|
||||||
user: room.getUser(room.directChatRemoteUser.id),
|
|
||||||
})
|
|
||||||
popup.closed.connect(() => {
|
|
||||||
userListItem.highlighted = false
|
|
||||||
})
|
|
||||||
if (roomDrawer.modal) {
|
|
||||||
roomDrawer.close()
|
|
||||||
}
|
|
||||||
popup.open()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
contentItem: KirigamiComponents.Avatar {
|
contentItem: KirigamiComponents.Avatar {
|
||||||
|
|||||||
@@ -207,14 +207,7 @@ ListView {
|
|||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
userDelegate.highlighted = true;
|
userDelegate.highlighted = true;
|
||||||
const popup = userDetailDialog.createObject(QQC2.ApplicationWindow.overlay, {
|
RoomManager.visitUser(room.getUser(userDelegate.userId).object, "mention")
|
||||||
room: root.room,
|
|
||||||
user: root.room.getUser(userDelegate.userId)
|
|
||||||
});
|
|
||||||
popup.closed.connect(() => {
|
|
||||||
userDelegate.highlighted = false;
|
|
||||||
});
|
|
||||||
popup.open();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
contentItem: RowLayout {
|
contentItem: RowLayout {
|
||||||
@@ -258,11 +251,6 @@ ListView {
|
|||||||
DirectChatDrawerHeader {}
|
DirectChatDrawerHeader {}
|
||||||
}
|
}
|
||||||
|
|
||||||
Component {
|
|
||||||
id: userDetailDialog
|
|
||||||
UserDetailDialog {}
|
|
||||||
}
|
|
||||||
|
|
||||||
onRoomChanged: {
|
onRoomChanged: {
|
||||||
if (root.headerItem) {
|
if (root.headerItem) {
|
||||||
root.headerItem.userListSearchField.text = "";
|
root.headerItem.userListSearchField.text = "";
|
||||||
|
|||||||
@@ -112,11 +112,6 @@ Kirigami.ApplicationWindow {
|
|||||||
secondaryWindow.show();
|
secondaryWindow.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
function onShowUserDetail(user) {
|
|
||||||
const roomItem = pageStack.get(pageStack.depth - 1);
|
|
||||||
roomItem.showUserDetail(user);
|
|
||||||
}
|
|
||||||
|
|
||||||
function onAskDirectChatConfirmation(user) {
|
function onAskDirectChatConfirmation(user) {
|
||||||
askDirectChatConfirmationComponent.createObject(QQC2.ApplicationWindow.overlay, {
|
askDirectChatConfirmationComponent.createObject(QQC2.ApplicationWindow.overlay, {
|
||||||
user: user,
|
user: user,
|
||||||
@@ -338,11 +333,6 @@ Kirigami.ApplicationWindow {
|
|||||||
RoomWindow {}
|
RoomWindow {}
|
||||||
}
|
}
|
||||||
|
|
||||||
Component {
|
|
||||||
id: userDialog
|
|
||||||
UserDetailDialog {}
|
|
||||||
}
|
|
||||||
|
|
||||||
Component {
|
Component {
|
||||||
id: askDirectChatConfirmationComponent
|
id: askDirectChatConfirmationComponent
|
||||||
|
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ public:
|
|||||||
*
|
*
|
||||||
* @sa Quotient::UriResolverBase::visitUser(), Quotient::UriResolverBase::visitResource()
|
* @sa Quotient::UriResolverBase::visitUser(), Quotient::UriResolverBase::visitResource()
|
||||||
*/
|
*/
|
||||||
UriResolveResult visitUser(User *user, const QString &action) override;
|
Q_INVOKABLE UriResolveResult visitUser(User *user, const QString &action) override;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Visit a room.
|
* @brief Visit a room.
|
||||||
|
|||||||
Reference in New Issue
Block a user