Make document picker work again, fix image picker

This commit is contained in:
Sebastian Wolf 2020-11-01 17:54:00 +01:00
parent fb5cf0d382
commit 30decc8f84

View file

@ -1002,7 +1002,7 @@ Page {
attachmentOptionsRow.visible = false; attachmentOptionsRow.visible = false;
console.log("Selected document: " + picker.selectedContentProperties.filePath ); console.log("Selected document: " + picker.selectedContentProperties.filePath );
attachmentPreviewRow.fileProperties = picker.selectedContentProperties; attachmentPreviewRow.fileProperties = picker.selectedContentProperties;
attachmentPreviewRow.isDocument = true; attachmentPreviewRow.isPicture = true;
attachmentPreviewRow.visible = true; attachmentPreviewRow.visible = true;
controlSendButton(); controlSendButton();
}) })
@ -1027,7 +1027,7 @@ Page {
id: documentAttachmentButton id: documentAttachmentButton
icon.source: "image://theme/icon-m-document" icon.source: "image://theme/icon-m-document"
onClicked: { onClicked: {
var picker = pageStack.push("Sailfish.Pickers.DocumentPicker"); var picker = pageStack.push("Sailfish.Pickers.DocumentPickerPage");
picker.selectedContentPropertiesChanged.connect(function(){ picker.selectedContentPropertiesChanged.connect(function(){
attachmentOptionsRow.visible = false; attachmentOptionsRow.visible = false;
console.log("Selected document: " + picker.selectedContentProperties.filePath ); console.log("Selected document: " + picker.selectedContentProperties.filePath );