Fix error when using upload button more than once
This commit is contained in:
parent
8f3df28b9d
commit
91064fc625
|
@ -216,6 +216,7 @@ Rectangle {
|
||||||
HFileDialogOpener {
|
HFileDialogOpener {
|
||||||
dialog.title: qsTr("Select files to upload")
|
dialog.title: qsTr("Select files to upload")
|
||||||
onFileChanged: {
|
onFileChanged: {
|
||||||
|
if (! file) return
|
||||||
let path = Qt.resolvedUrl(file).replace(/^file:/, "")
|
let path = Qt.resolvedUrl(file).replace(/^file:/, "")
|
||||||
let args = [chatPage.roomId, path]
|
let args = [chatPage.roomId, path]
|
||||||
py.callClientCoro(chatPage.userId, "send_file", args)
|
py.callClientCoro(chatPage.userId, "send_file", args)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user