Remove utils.sendFile(), useless wrapper
This commit is contained in:
parent
09ae0d7776
commit
040e966d27
|
@ -17,10 +17,10 @@ HFileDialogOpener {
|
||||||
for (const file of files) {
|
for (const file of files) {
|
||||||
const path = Qt.resolvedUrl(file).replace(/^file:/, "")
|
const path = Qt.resolvedUrl(file).replace(/^file:/, "")
|
||||||
|
|
||||||
utils.sendFile(userId, roomId, path, () => {
|
py.callClientCoro(userId, "send_file", [roomId, path], () => {
|
||||||
if (destroyWhenDone) destroy()
|
if (destroyWhenDone) destroy()
|
||||||
},
|
|
||||||
(type, args, error, traceback) => {
|
}, (type, args, error, traceback) => {
|
||||||
console.error(`python:\n${traceback}`)
|
console.error(`python:\n${traceback}`)
|
||||||
if (destroyWhenDone) destroy()
|
if (destroyWhenDone) destroy()
|
||||||
})
|
})
|
||||||
|
|
|
@ -25,7 +25,9 @@ HColumnPopup {
|
||||||
text: qsTr("Send")
|
text: qsTr("Send")
|
||||||
icon.name: "confirm-uploading-file"
|
icon.name: "confirm-uploading-file"
|
||||||
onClicked: {
|
onClicked: {
|
||||||
utils.sendFile(popup.userId, popup.roomId, filePath)
|
py.callClientCoro(
|
||||||
|
popup.userId, "send_file", [popup.roomId, filePath],
|
||||||
|
)
|
||||||
popup.close()
|
popup.close()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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) {
|
function sumChildrenImplicitWidths(visibleChildren, spacing=0) {
|
||||||
let sum = 0
|
let sum = 0
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user