From c31aebca67f989247c37bee6f1104c43a0329082 Mon Sep 17 00:00:00 2001 From: Narasimha-sc <166327228+Narasimha-sc@users.noreply.github.com> Date: Thu, 18 Jun 2026 14:43:17 +0000 Subject: [PATCH] android, desktop, ios: render media support messages in the chat list preview, not the status text MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ChatPreviewView showed the status info text (e.g. a pending invitee's 'reviewed by admins') whenever the last item's text was empty (hasMsgContent), which also caught caption-less media — so a photo/voice/file support message showed the status text next to its already-rendered thumbnail. Show the status only for true no-content items (events, msgContent == null); any message, including caption-less media, falls through to render its content. --- apps/ios/Shared/Views/ChatList/ChatPreviewView.swift | 5 ++++- .../chat/simplex/common/views/chatlist/ChatPreviewView.kt | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/apps/ios/Shared/Views/ChatList/ChatPreviewView.swift b/apps/ios/Shared/Views/ChatList/ChatPreviewView.swift index 59b92a265b..6017508961 100644 --- a/apps/ios/Shared/Views/ChatList/ChatPreviewView.swift +++ b/apps/ios/Shared/Views/ChatList/ChatPreviewView.swift @@ -352,7 +352,10 @@ struct ChatPreviewView: View { if chatModel.draftChatId == chat.id, let draft = chatModel.draft { let (t, hasSecrets) = messageDraft(draft) chatPreviewLayout(t, draft: true, hasFilePreview: hasFilePreview, hasSecrets: hasSecrets) - } else if cItem?.content.hasMsgContent != true, let previewText = chatPreviewInfoText() { + } else if cItem?.content.msgContent == nil, let previewText = chatPreviewInfoText() { + // only a no-content item (a group/connection event) shows the status text; a message — + // including caption-less media — falls through to render its content (thumbnail shown + // separately), e.g. a pending invitee's photo shows "image" instead of "reviewed by admins" chatPreviewInfoTextLayout(previewText) } else if let cItem = cItem { let (t, hasSecrets) = chatItemPreview(cItem) diff --git a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chatlist/ChatPreviewView.kt b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chatlist/ChatPreviewView.kt index fbc4c7e336..cd781ae869 100644 --- a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chatlist/ChatPreviewView.kt +++ b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chatlist/ChatPreviewView.kt @@ -246,7 +246,10 @@ fun ChatPreviewView( inlineContent = inlineTextContent, modifier = Modifier.fillMaxWidth() ) - } else if (ci?.content?.hasMsgContent != true && previewText != null) { + } else if (ci?.content?.msgContent == null && previewText != null) { + // only a no-content item (a group/connection event) shows the status text; a message — + // including caption-less media — falls through to render its content (the media thumbnail is + // shown separately), e.g. a pending invitee's photo shows "image" instead of "reviewed by admins" Text(previewText.first, color = previewText.second) } else if (ci != null && showChatPreviews) { val (text: CharSequence, inlineTextContent) = when {