mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-03-30 16:25:57 +00:00
ui: fix connecting to group with member review (#6072)
This commit is contained in:
@@ -2481,10 +2481,15 @@ func processReceivedMsg(_ res: ChatEvent) async {
|
||||
await MainActor.run {
|
||||
m.updateGroup(groupInfo)
|
||||
}
|
||||
if m.chatId == groupInfo.id,
|
||||
case .memberSupport(nil) = m.secondaryIM?.groupScopeInfo {
|
||||
await MainActor.run {
|
||||
m.secondaryPendingInviteeChatOpened = false
|
||||
if m.chatId == groupInfo.id {
|
||||
if groupInfo.membership.memberPending {
|
||||
await MainActor.run {
|
||||
m.secondaryPendingInviteeChatOpened = true
|
||||
}
|
||||
} else if case .memberSupport(nil) = m.secondaryIM?.groupScopeInfo {
|
||||
await MainActor.run {
|
||||
m.secondaryPendingInviteeChatOpened = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -290,6 +290,13 @@ struct ChatView: View {
|
||||
}
|
||||
}
|
||||
}
|
||||
.onChange(of: chatModel.secondaryPendingInviteeChatOpened) { secondaryChatOpened in
|
||||
if secondaryChatOpened {
|
||||
ItemsModel.loadSecondaryChat(chat.id, chatFilter: .groupChatScopeContext(groupScopeInfo: userSupportScopeInfo)) {
|
||||
showUserSupportChatSheet = true
|
||||
}
|
||||
}
|
||||
}
|
||||
.onChange(of: chatModel.chatId) { cId in
|
||||
ConnectProgressManager.shared.cancelConnectProgress()
|
||||
showChatInfoSheet = false
|
||||
|
||||
@@ -2872,6 +2872,7 @@ object ChatController {
|
||||
}
|
||||
if (
|
||||
chatModel.chatId.value == r.groupInfo.id
|
||||
&& !r.groupInfo.membership.memberPending
|
||||
&& ModalManager.end.hasModalOpen(ModalViewId.SECONDARY_CHAT)
|
||||
&& chatModel.secondaryChatsContext.value?.secondaryContextFilter is SecondaryContextFilter.GroupChatScopeContext
|
||||
) {
|
||||
|
||||
Reference in New Issue
Block a user