diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 2b6e61cc2..1e35f9fdd 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -165,6 +165,8 @@ if(ANDROID) "download" "smiley" "tools-check-spelling" + "username-copy" + "edit-copy" ) else() target_link_libraries(neochat PUBLIC Qt::Widgets KF5::KIOWidgets) diff --git a/src/qml/Dialog/UserDetailDialog.qml b/src/qml/Dialog/UserDetailDialog.qml index 86c3a76b1..b2e574f79 100644 --- a/src/qml/Dialog/UserDetailDialog.qml +++ b/src/qml/Dialog/UserDetailDialog.qml @@ -160,6 +160,15 @@ Kirigami.OverlaySheet { } } } + Kirigami.BasicListItem { + action: Kirigami.Action { + text: i18n("Copy link") + icon.name: "username-copy" + onTriggered: { + Clipboard.saveText("https://matrix.to/#/" + user.id) + } + } + } Component { id: fullScreenImage diff --git a/src/qml/Menu/Timeline/MessageDelegateContextMenu.qml b/src/qml/Menu/Timeline/MessageDelegateContextMenu.qml index 8b4f2e973..11057cf80 100644 --- a/src/qml/Menu/Timeline/MessageDelegateContextMenu.qml +++ b/src/qml/Menu/Timeline/MessageDelegateContextMenu.qml @@ -76,6 +76,13 @@ Loader { width: Kirigami.Units.gridUnit * 25 }); } + }, + Kirigami.Action { + text: i18n("Copy Link") + icon.name: "edit-copy" + onTriggered: { + Clipboard.saveText("https://matrix.to/#/" + currentRoom.id + "/" + loadRoot.eventId) + } } ]