correctly display filename in MimeComponents

(previously it would include the caption text and save with it as
filename)
Don't append filename to the caption.

Relevant spec: https://spec.matrix.org/latest/client-server-api/#mfile
This commit is contained in:
Andreas Gattringer
2024-07-15 12:34:11 +02:00
parent 029bda5734
commit a4a411cf1f
3 changed files with 26 additions and 17 deletions

View File

@@ -45,6 +45,7 @@ ColumnLayout {
* - width - The width in pixels of the audio media.
* - height - The height in pixels of the audio media.
* - tempInfo - mediaInfo (with the same properties as this except no tempInfo) for a temporary image while the file downloads.
* - filename
*/
required property var mediaInfo
@@ -155,7 +156,7 @@ ColumnLayout {
spacing: 0
QQC2.Label {
Layout.fillWidth: true
text: root.display
text: root.mediaInfo.filename
wrapMode: Text.Wrap
elide: Text.ElideRight
}