Copy image to the clipboard
Add a context menu option to save an image in the timeline to the clipboard BUG: 466478
This commit is contained in:
committed by
Tobias Fella
parent
bd4eeb405b
commit
d1f7e7091e
@@ -55,6 +55,20 @@ MessageDelegateContextMenu {
|
||||
root.closeFullscreen()
|
||||
}
|
||||
},
|
||||
Kirigami.Action {
|
||||
text: i18n("Copy")
|
||||
icon.name: "edit-copy"
|
||||
onTriggered: {
|
||||
if(file.downloaded) {
|
||||
Clipboard.setImage(progressInfo.localPath)
|
||||
} else {
|
||||
file.onDownloadedChanged.connect(function() {
|
||||
Clipboard.setImage(progressInfo.localPath)
|
||||
});
|
||||
currentRoom.downloadFile(eventId, StandardPaths.writableLocation(StandardPaths.CacheLocation) + "/" + eventId.replace(":", "_").replace("/", "_").replace("+", "_") + currentRoom.fileNameToDownload(eventId))
|
||||
}
|
||||
}
|
||||
},
|
||||
Kirigami.Action {
|
||||
visible: author.id === currentRoom.localUser.id || currentRoom.canSendState("redact")
|
||||
text: i18n("Remove")
|
||||
|
||||
Reference in New Issue
Block a user