diff --git a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chat/group/MemberSupportView.kt b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chat/group/MemberSupportView.kt index e7f1ef66ef..7dc8d335ae 100644 --- a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chat/group/MemberSupportView.kt +++ b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chat/group/MemberSupportView.kt @@ -41,7 +41,7 @@ fun ModalData.MemberSupportView( KeyChangeEffect(chatModel.chatId.value) { ModalManager.end.closeModals() } - LaunchedEffect(Unit) { + LaunchedEffect(chatModel.membersLoaded.value) { if (!chatModel.membersLoaded.value) { setGroupMembers(rhId, groupInfo, chatModel) } diff --git a/plans/member-support-list-events.md b/plans/member-support-list-events.md index bfce394cd8..4e09a06255 100644 --- a/plans/member-support-list-events.md +++ b/plans/member-support-list-events.md @@ -48,7 +48,7 @@ Load the list once per open group, then keep it current from what arrives. - the mark-read response; - the initial load of a support chat. - `JoinedGroupMember` and `JoinedGroupMemberConnecting` are emitted right after the "new member pending review" item, and they carry the member with zero support stats. Their handlers keep the support stats already in the list, so they do not erase the badge the item event just set. On Kotlin that item event can also be applied after them; the merge covers either order. -- The member list loads only if `membersLoaded` is false. The mention picker already uses this flag the same way, and it is reset when leaving the group. +- The member list loads only if `membersLoaded` is false. On Kotlin the load effect is keyed on `membersLoaded`, so a reset while the list is open (for example `ChatView` recomposing after an Android configuration change) reloads it. The mention picker already uses this flag the same way, and it is reset when leaving the group. - `apiListMembers` returns `null`/`nil` on error on both platforms, and the member load then keeps the current state, so a failed load does not mark members as loaded. iOS still runs the load's completion, so group info still opens. - iOS clears the loaded members and resets `membersLoaded` when the open chat changes without going through the chat list (notification tap, "forwarded from", member info), as Kotlin already does. Because group info can also be opened from a message avatar without reloading members, the iOS list additionally reloads unless members were loaded for this group (`membersLoadedGroupId`). - iOS resets `membersLoaded` when chats are refreshed on resume, because the notification extension may have changed support chats while the app was suspended.