Why can't we be friends

Update the UX to refer to structure direct chats as friends. The direct chats are pulled into their own tab in the space drawer.

The `UserDetailDialog` is also updated to check whether a direct chat already exists and if not ask to invite as friend.

![image](/uploads/67f13fa8558e704e0acaf7c60e135bbc/image.png)
This commit is contained in:
James Graham
2024-01-13 21:38:43 +00:00
parent 981edc9cf7
commit 77e366b179
9 changed files with 222 additions and 9 deletions

View File

@@ -215,7 +215,7 @@ Kirigami.Dialog {
FormCard.FormButtonDelegate {
visible: !root.user.isLocalUser
action: Kirigami.Action {
text: i18n("Open a private chat")
text: root.room.connection.directChatExists(root.user.object) ? i18nc("%1 is the name of the user.", "Chat with %1", root.user.displayName) : i18n("Invite to private chat")
icon.name: "document-send"
onTriggered: {
root.room.connection.openOrCreateDirectChat(root.user.object)