Add preview for Text media.

This commit is contained in:
Benoit Marty 2025-03-18 11:24:13 +01:00
parent 5825160d29
commit ba59fe27ba
2 changed files with 30 additions and 0 deletions

View file

@ -156,3 +156,24 @@ fun aVoiceMediaInfo(
waveform = waveForm,
duration = duration,
)
fun aTxtMediaInfo(
filename: String = "a text file.txt",
caption: String? = null,
senderName: String? = null,
dateSent: String? = null,
dateSentFull: String? = null,
): MediaInfo = MediaInfo(
filename = filename,
caption = caption,
mimeType = MimeTypes.PlainText,
formattedFileSize = "2kB",
fileExtension = "txt",
senderId = UserId("@alice:server.org"),
senderName = senderName,
senderAvatar = null,
dateSent = dateSent,
dateSentFull = dateSentFull,
waveform = null,
duration = null,
)