Allow user to copy the room address to the clipboard
Contributes to #469
This commit is contained in:
committed by
Carl Schwan
parent
dd75eaec2c
commit
d1dce37ea7
@@ -10,6 +10,7 @@ import org.kde.kirigami 2.19 as Kirigami
|
|||||||
import org.kde.neochat 1.0
|
import org.kde.neochat 1.0
|
||||||
import NeoChat.Page 1.0
|
import NeoChat.Page 1.0
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Context menu when clicking on a room in the room list
|
* Context menu when clicking on a room in the room list
|
||||||
*/
|
*/
|
||||||
@@ -46,6 +47,18 @@ Menu {
|
|||||||
onTriggered: room.markAllMessagesAsRead()
|
onTriggered: room.markAllMessagesAsRead()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MenuItem {
|
||||||
|
text: i18nc("@action:inmenu", "Copy address to clipboard")
|
||||||
|
|
||||||
|
onTriggered: {
|
||||||
|
if (room.canonicalAlias.length === 0) {
|
||||||
|
Clipboard.saveText(room.id)
|
||||||
|
} else {
|
||||||
|
Clipboard.saveText(room.canonicalAlias)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
MenuSeparator {}
|
MenuSeparator {}
|
||||||
|
|
||||||
MenuItem {
|
MenuItem {
|
||||||
|
|||||||
Reference in New Issue
Block a user