mobile: show transcript preview for media particles in stream list
This commit is contained in:
@@ -75,10 +75,13 @@ export const StreamCard = memo(function StreamCard({
|
||||
if (!latestChild) return "No messages yet";
|
||||
if (isParticleDeleted(latestChild)) return "Message deleted";
|
||||
switch (latestChild.type) {
|
||||
case "media":
|
||||
return latestChild.properties.mime_type.startsWith("audio/")
|
||||
? "Voice message"
|
||||
: "Video message";
|
||||
case "media": {
|
||||
const mime = latestChild.properties.mime_type;
|
||||
if (mime.startsWith("image/")) return "Photo";
|
||||
const transcriptText = latestChild.properties.transcript?.transcript;
|
||||
if (transcriptText) return transcriptText;
|
||||
return mime.startsWith("audio/") ? "Voice note" : "Video clip";
|
||||
}
|
||||
case "text":
|
||||
return latestChild.properties.content;
|
||||
case "file":
|
||||
|
||||
Reference in New Issue
Block a user