mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-11-22 19:58:26 +00:00
A member pending review has no main scope to write in, so their "chat with admins" messages are what the group's row in the chat list should show. New support items reach the row since #5909 and #7072; this covers edits, status changes and deletions of those items, the invitee's own edits, and which item the row shows. Chat list: - upsertChatItem and removeChatItem use ChatInfo.inMainChatList (added on iOS here, as in Kotlin) instead of the main-scope test, so edits, status changes and deletions of a support item reach the row that shows it; only a main scope chat can still be added to the list. On iOS, an item not loaded in the open chat replaces the preview only for main-scope items. - previewItem, extracted from addChatItem on both platforms, picks the row's item: for a pending invitee the onboarding events (pending review, "end-to-end encrypted" info, member connected) do not replace a message, and a message replaces them, whatever their timestamps; otherwise the later item wins. Sent edits reach only the active chats context, so ChatModel.upsertSentChatItem updates the primary context as well when the active context is a support chat shown in the main list, as addSentChatItem does for new items. Cross context dispatch stays with the caller, as in processReceivedMsg; no ChatsContext method touches the other context. The chat preview row shows the message instead of the "reviewed by admins" status when there is text or, with previews enabled, content that is rendered without text (a media item without a caption).