From 7fe7e6393ea2e541d4c1985dcb1a19fe125c9dd4 Mon Sep 17 00:00:00 2001 From: Narasimha-sc <166327228+Narasimha-sc@users.noreply.github.com> Date: Tue, 1 Sep 2026 08:39:22 +0000 Subject: [PATCH] ui: show own support chat after leaving or being removed from the group The "chat with admins" row is gated on membership.memberActive, which is false for left, removed, rejected and group deleted. Messages received in that chat before the user stopped being an active member stay unread with no way to open the chat and read them, and getUsersInfo counts every rcv_new item in a group, support scopes included, so they inflate the profile unread count until the whole profile is marked read. Reproduced by joining a group with admission review, being messaged by an admin in the support chat and then removed: two received items stay rcv_new with group_scope_tag member_support and a null scope member id, the id being null because it is the user's own support chat, and the profile count stays at 2. Reading that scope over the API clears it, so the items are reachable - only the UI hides them. Show the support chat whenever one exists, and apply the active member, group preference and role checks only to offering to start a new one. --- apps/ios/Shared/Views/Chat/Group/GroupChatInfoView.swift | 7 ++++--- .../simplex/common/views/chat/group/GroupChatInfoView.kt | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/apps/ios/Shared/Views/Chat/Group/GroupChatInfoView.swift b/apps/ios/Shared/Views/Chat/Group/GroupChatInfoView.swift index 1be8070259..053edd1cb9 100644 --- a/apps/ios/Shared/Views/Chat/Group/GroupChatInfoView.swift +++ b/apps/ios/Shared/Views/Chat/Group/GroupChatInfoView.swift @@ -103,9 +103,10 @@ struct GroupChatInfoView: View { } } - let showUserSupportChat = groupInfo.membership.memberActive - && ((groupInfo.fullGroupPreferences.support.on && groupInfo.membership.memberRole < .moderator) - || groupInfo.membership.supportChat != nil) + let showUserSupportChat = groupInfo.membership.supportChat != nil + || (groupInfo.membership.memberActive + && groupInfo.fullGroupPreferences.support.on + && groupInfo.membership.memberRole < .moderator) if groupInfo.useRelays { Section { diff --git a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chat/group/GroupChatInfoView.kt b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chat/group/GroupChatInfoView.kt index 49e7ac6db7..722a8fe008 100644 --- a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chat/group/GroupChatInfoView.kt +++ b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chat/group/GroupChatInfoView.kt @@ -629,9 +629,10 @@ fun ModalData.GroupChatInfoLayout( var anyTopSectionRowShow = false val channelLink = groupInfo.groupProfile.publicGroup?.groupLink - val showUserSupportChat = groupInfo.membership.memberActive && - ((groupInfo.fullGroupPreferences.support.on && groupInfo.membership.memberRole < GroupMemberRole.Moderator) - || groupInfo.membership.supportChat != null) + val showUserSupportChat = groupInfo.membership.supportChat != null || + (groupInfo.membership.memberActive + && groupInfo.fullGroupPreferences.support.on + && groupInfo.membership.memberRole < GroupMemberRole.Moderator) if (groupInfo.useRelays) { SectionView {