diff --git a/src/gui/Dialogs/SendFilePicker.qml b/src/gui/Dialogs/SendFilePicker.qml index 6a0b1a77..e97fa5d2 100644 --- a/src/gui/Dialogs/SendFilePicker.qml +++ b/src/gui/Dialogs/SendFilePicker.qml @@ -17,10 +17,10 @@ HFileDialogOpener { for (const file of files) { const path = Qt.resolvedUrl(file).replace(/^file:/, "") - utils.sendFile(userId, roomId, path, () => { + py.callClientCoro(userId, "send_file", [roomId, path], () => { if (destroyWhenDone) destroy() - }, - (type, args, error, traceback) => { + + }, (type, args, error, traceback) => { console.error(`python:\n${traceback}`) if (destroyWhenDone) destroy() }) diff --git a/src/gui/Popups/ConfirmUploadPopup.qml b/src/gui/Popups/ConfirmUploadPopup.qml index cef4ee4b..138c542b 100644 --- a/src/gui/Popups/ConfirmUploadPopup.qml +++ b/src/gui/Popups/ConfirmUploadPopup.qml @@ -25,7 +25,9 @@ HColumnPopup { text: qsTr("Send") icon.name: "confirm-uploading-file" onClicked: { - utils.sendFile(popup.userId, popup.roomId, filePath) + py.callClientCoro( + popup.userId, "send_file", [popup.roomId, filePath], + ) popup.close() } } diff --git a/src/gui/Utils.qml b/src/gui/Utils.qml index 2fea6921..c0bcc15f 100644 --- a/src/gui/Utils.qml +++ b/src/gui/Utils.qml @@ -498,12 +498,6 @@ QtObject { } - function sendFile(userId, roomId, path, onSuccess, onError) { - py.callClientCoro( - userId, "send_file", [roomId, path], onSuccess, onError, - ) - } - function sumChildrenImplicitWidths(visibleChildren, spacing=0) { let sum = 0