Fix sharing

This commit is contained in:
Tobias Fella
2024-02-19 22:50:16 +01:00
parent 5b0068d9e4
commit 38acfe04b9
7 changed files with 61 additions and 40 deletions

View File

@@ -89,20 +89,12 @@ DelegateContextMenu {
ShareAction {
id: shareAction
inputData: {
'urls': [],
'mimeType': [root.mimeType]
"urls": [filename],
"mimeType": [root.mimeType]
}
room: currentRoom
eventId: root.eventId
property string filename: StandardPaths.writableLocation(StandardPaths.CacheLocation) + "/" + eventId.replace(":", "_").replace("/", "_").replace("+", "_") + currentRoom.fileNameToDownload(eventId)
doBeforeSharing: () => {
currentRoom.downloadFile(eventId, filename);
}
Component.onCompleted: {
shareAction.inputData = {
urls: [filename],
mimeType: [root.mimeType]
};
}
}
]