Commit 1f1221cb authored by Jonah Brüchert's avatar Jonah Brüchert 🌳

ChatPage: Load file chooser when needed

parent bfe6b620
Pipeline #14808 passed with stages
in 23 minutes and 13 seconds
......@@ -315,17 +315,16 @@ ChatPageBase {
id: sendMediaSheet
}
FileChooser {
id: fileChooser
title: qsTr("Select a file")
onAccepted: sendMediaSheet.sendFile(Kaidan.messageModel.chatPartner, fileUrl)
Loader {
id: fileChooserLoader
}
function openFileDialog(filterName, filter, title) {
fileChooser.selectedNameFilter = filterName
fileChooserLoader.source = "qrc:/qml/elements/FileChooser.qml"
fileChooserLoader.item.selectedNameFilter = filterName
if (title !== undefined)
fileChooser.title = title
fileChooser.open()
fileChooserLoader.item.title = title
fileChooserLoader.item.open()
mediaDrawer.close()
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment