Improve "Copy text" text and availability

This commit is contained in:
miruka 2020-03-26 21:34:51 -04:00
parent 18f53829d9
commit 43c018d0a4
2 changed files with 9 additions and 3 deletions

View File

@ -1,6 +1,5 @@
# TODO # TODO
- show "copy selection" when right clicking on image
- make it not select messages when closing context menu - make it not select messages when closing context menu
- long-press-drag to select multiple messages on touch - long-press-drag to select multiple messages on touch
- drag to select on non-touch - drag to select on non-touch

View File

@ -188,8 +188,15 @@ HColumnLayout {
HMenuItem { HMenuItem {
icon.name: "copy-text" icon.name: "copy-text"
text: qsTr("Copy text") text:
visible: ! copyLink.visible && ! copyMedia.visible eventList.selectedCount ?
qsTr("Copy selection") :
copyMedia.visible ?
qsTr("Copy filename") :
qsTr("Copy text")
onTriggered: { onTriggered: {
if (! eventList.selectedCount) { if (! eventList.selectedCount) {
Clipboard.text = JSON.parse(model.source).body Clipboard.text = JSON.parse(model.source).body