diff --git a/src/app/global/utils.nim b/src/app/global/utils.nim index 1bbe28f9b3..1ebc982503 100644 --- a/src/app/global/utils.nim +++ b/src/app/global/utils.nim @@ -105,9 +105,15 @@ QtObject: proc copyImageToClipboard*(self: Utils, content: string) {.slot.} = setClipBoardImage(content) + proc copyImageToClipboardByUrl*(self: Utils, url: string) {.slot.} = + setClipBoardImageByUrl(url) + proc downloadImage*(self: Utils, content: string, path: string) {.slot.} = downloadImage(content, path) + proc downloadImageByUrl*(self: Utils, url: string, path: string) {.slot.} = + downloadImageByUrl(url, path) + proc generateQRCodeSVG*(self: Utils, text: string, border: int = 0): string = var qr0: array[0..qrcodegen_BUFFER_LEN_MAX, uint8] var tempBuffer: array[0..qrcodegen_BUFFER_LEN_MAX, uint8] diff --git a/ui/app/AppLayouts/Chat/stores/RootStore.qml b/ui/app/AppLayouts/Chat/stores/RootStore.qml index feb0a9f23e..0fb1ef3738 100644 --- a/ui/app/AppLayouts/Chat/stores/RootStore.qml +++ b/ui/app/AppLayouts/Chat/stores/RootStore.qml @@ -167,12 +167,12 @@ QtObject { globalUtilsInst.copyToClipboard(text) } - function copyImageToClipboard(content) { - globalUtilsInst.copyImageToClipboard(content) + function copyImageToClipboardByUrl(content) { + globalUtilsInst.copyImageToClipboardByUrl(content) } - function downloadImage(content, path) { - globalUtilsInst.downloadImage(content, path) + function downloadImageByUrl(url, path) { + globalUtilsInst.downloadImageByUrl(url, path) } function isCurrentUser(pubkey) { diff --git a/ui/imports/shared/views/chat/MessageContextMenuView.qml b/ui/imports/shared/views/chat/MessageContextMenuView.qml index e6e8a42df6..39c74d46de 100644 --- a/ui/imports/shared/views/chat/MessageContextMenuView.qml +++ b/ui/imports/shared/views/chat/MessageContextMenuView.qml @@ -141,7 +141,7 @@ StatusPopupMenu { text: qsTr("Copy image") onTriggered: { if (root.imageSource) { - root.store.copyImageToClipboard(root.imageSource) + root.store.copyImageToClipboardByUrl(root.imageSource) } root.close() } @@ -324,7 +324,7 @@ StatusPopupMenu { modality: Qt.NonModal onAccepted: { if (root.imageSource) { - root.store.downloadImage(root.imageSource, fileDialog.fileUrls) + root.store.downloadImageByUrl(root.imageSource, fileDialog.fileUrls) } fileDialog.close() } diff --git a/vendor/DOtherSide b/vendor/DOtherSide index 676b1d9bc8..7c9d386121 160000 --- a/vendor/DOtherSide +++ b/vendor/DOtherSide @@ -1 +1 @@ -Subproject commit 676b1d9bc8a3b0d6e87d10f0ac7b5deff626266f +Subproject commit 7c9d386121d18a2deb8943286a6980a62d1f7b91 diff --git a/vendor/nimqml b/vendor/nimqml index eb20a5ffb9..d1b79f8a4c 160000 --- a/vendor/nimqml +++ b/vendor/nimqml @@ -1 +1 @@ -Subproject commit eb20a5ffb964507e508bfaa120c71f7c81c5cf8e +Subproject commit d1b79f8a4c0d35e5b7accd4620c727dabfa0b223