diff --git a/apps/ios/Shared/Views/ChatList/ChatPreviewView.swift b/apps/ios/Shared/Views/ChatList/ChatPreviewView.swift index 57e21c227a..c3fa44dce1 100644 --- a/apps/ios/Shared/Views/ChatList/ChatPreviewView.swift +++ b/apps/ios/Shared/Views/ChatList/ChatPreviewView.swift @@ -347,12 +347,13 @@ struct ChatPreviewView: View { } @ViewBuilder private func chatMessagePreview(_ cItem: ChatItem?, _ hasFilePreview: Bool = false) -> some View { + // pending invitee only: a member-support message (incl. caption-less media) renders its content, + // not the "reviewed by admins" status; other chats keep the original no-text behaviour + let previewHasNoContent = chat.chatInfo.groupInfo?.membership.memberPending ?? false ? cItem?.content.msgContent == nil : cItem?.content.hasMsgContent != true 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.msgContent == nil, let previewText = chatPreviewInfoText() { - // status text only for no-content events; any message (incl. caption-less media) renders - // its content (thumbnail shown separately) - e.g. a pending invitee's photo shows "image" + } else if previewHasNoContent, let previewText = chatPreviewInfoText() { 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 5c6aa2e4d3..6106be37db 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 @@ -218,6 +218,9 @@ fun ChatPreviewView( fun chatPreviewText() { val previewText = chatPreviewInfoText() val ci = chat.chatItems.lastOrNull() + // pending invitee only: a member-support message (incl. caption-less media) renders its content, not + // the "reviewed by admins" status; other chats keep the original no-text behaviour + val previewHasNoContent = if (cInfo.groupInfo_?.membership?.memberPending == true) ci?.content?.msgContent == null else ci?.content?.hasMsgContent != true if (chatModelDraftChatId == chat.id && chatModelDraft != null) { val sp20 = with(LocalDensity.current) { 20.sp.toDp() } val (text: CharSequence, inlineTextContent) = remember(chatModelDraft) { chatModelDraft.message.text to messageDraft(chatModelDraft, sp20) } @@ -238,9 +241,7 @@ fun ChatPreviewView( inlineContent = inlineTextContent, modifier = Modifier.fillMaxWidth() ) - } else if (ci?.content?.msgContent == null && previewText != null) { - // status text only for no-content events; any message (incl. caption-less media) renders its - // content (thumbnail shown separately) - e.g. a pending invitee's photo shows "image", not the status + } else if (previewHasNoContent && previewText != null) { Text(previewText.first, color = previewText.second) } else if (ci != null && showChatPreviews) { val (text: CharSequence, inlineTextContent) = when {