[Media viewer] Improve rendering of files

Closes #6899
Closes #6908
This commit is contained in:
Benoit Marty
2026-06-02 10:22:34 +02:00
parent a095190902
commit 97135272ec
6 changed files with 78 additions and 37 deletions
@@ -103,6 +103,30 @@ fun aPdfMediaInfo(
duration = null,
)
fun aZipMediaInfo(
filename: String = "a zip file.zip",
caption: String? = null,
formattedCaption: CharSequence? = null,
senderName: String? = null,
dateSent: String? = null,
dateSentFull: String? = null,
): MediaInfo = MediaInfo(
filename = filename,
fileSize = 12 * 1024 * 1024,
caption = caption,
formattedCaption = formattedCaption,
mimeType = MimeTypes.Pdf,
formattedFileSize = "45MB",
fileExtension = "zip",
senderId = UserId("@alice:server.org"),
senderName = senderName,
senderAvatar = null,
dateSent = dateSent,
dateSentFull = dateSentFull,
waveform = null,
duration = null,
)
fun anApkMediaInfo(
senderId: UserId? = UserId("@alice:server.org"),
senderName: String? = null,