diff --git a/apps/ios/Shared/Views/Chat/Group/ChannelRelaysView.swift b/apps/ios/Shared/Views/Chat/Group/ChannelRelaysView.swift index cf6426fe15..6600cec47b 100644 --- a/apps/ios/Shared/Views/Chat/Group/ChannelRelaysView.swift +++ b/apps/ios/Shared/Views/Chat/Group/ChannelRelaysView.swift @@ -24,22 +24,24 @@ struct ChannelRelaysView: View { var body: some View { List { relaysList() - if groupInfo.isOwner { - Section { - Button { - showAddRelay = true - } label: { - Label("Add relay", systemImage: "plus") - } - } - } - } - .sheet(isPresented: $showAddRelay) { - let existingRelayIds = Set(groupRelays.filter { $0.relayStatus != .rsInactive }.compactMap { $0.userChatRelay.chatRelayId }) - AddGroupRelayView(groupInfo: groupInfo, existingRelayIds: existingRelayIds) { - Task { await chatModel.loadGroupMembers(groupInfo) } - } + // TODO [relays] re-enable when relay management ships + // if groupInfo.isOwner { + // Section { + // Button { + // showAddRelay = true + // } label: { + // Label("Add relay", systemImage: "plus") + // } + // } + // } } + // TODO [relays] re-enable when relay management ships + // .sheet(isPresented: $showAddRelay) { + // let existingRelayIds = Set(groupRelays.filter { $0.relayStatus != .rsInactive }.compactMap { $0.userChatRelay.chatRelayId }) + // AddGroupRelayView(groupInfo: groupInfo, existingRelayIds: existingRelayIds) { + // Task { await chatModel.loadGroupMembers(groupInfo) } + // } + // } .onAppear { Task { await chatModel.loadGroupMembers(groupInfo) @@ -78,18 +80,20 @@ struct ChannelRelaysView: View { : subscriberRelayStatusText(member.wrapped) relayMemberRow(member.wrapped, statusText: statusText) } - if groupInfo.isOwner && member.wrapped.canBeRemoved(groupInfo: groupInfo) { - link.swipeActions(edge: .trailing) { - Button { - showRemoveMemberAlert(groupInfo, member.wrapped) - } label: { - Label("Remove relay", systemImage: "trash") - } - .tint(.red) - } - } else { - link - } + // TODO [relays] re-enable when relay management ships + // if groupInfo.isOwner && member.wrapped.canBeRemoved(groupInfo: groupInfo) { + // link.swipeActions(edge: .trailing) { + // Button { + // showRemoveMemberAlert(groupInfo, member.wrapped) + // } label: { + // Label("Remove relay", systemImage: "trash") + // } + // .tint(.red) + // } + // } else { + // link + // } + link } } footer: { Text("Chat relays forward messages to channel subscribers.") diff --git a/apps/ios/Shared/Views/Chat/Group/GroupMemberInfoView.swift b/apps/ios/Shared/Views/Chat/Group/GroupMemberInfoView.swift index 01a8833b9c..883a768d97 100644 --- a/apps/ios/Shared/Views/Chat/Group/GroupMemberInfoView.swift +++ b/apps/ios/Shared/Views/Chat/Group/GroupMemberInfoView.swift @@ -641,7 +641,8 @@ struct GroupMemberInfoView: View { blockForAllButton(mem) } } - if canRemove { + // TODO [relays] re-enable when relay management ships + if canRemove && mem.memberRole != .relay { if mem.memberStatus != .memRemoved && (mem.memberStatus != .memLeft || mem.memberRole == .relay) { removeMemberButton(mem) } else if mem.memberRole != .relay { diff --git a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chat/group/ChannelRelaysView.kt b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chat/group/ChannelRelaysView.kt index 2091f66e1d..891753aed8 100644 --- a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chat/group/ChannelRelaysView.kt +++ b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chat/group/ChannelRelaysView.kt @@ -87,6 +87,8 @@ private fun ChannelRelaysLayout( minHeight = 54.dp, padding = PaddingValues(horizontal = DEFAULT_PADDING) ) { + // TODO [relays] re-enable when relay management ships + /* if (groupInfo.isOwner && member.canBeRemoved(groupInfo)) { DefaultDropdownMenu(showMenu) { ItemAction(generalGetString(MR.strings.button_remove_relay), painterResource(MR.images.ic_delete), color = MaterialTheme.colors.error, onClick = { @@ -95,6 +97,7 @@ private fun ChannelRelaysLayout( }) } } + */ val statusText = if (groupInfo.isOwner) { ownerRelayStatusText(member, groupRelays) } else { @@ -106,6 +109,8 @@ private fun ChannelRelaysLayout( } SectionTextFooter(generalGetString(MR.strings.chat_relays_forward_messages)) } + // TODO [relays] re-enable when relay management ships + /* if (groupInfo.isOwner) { SectionView { SectionItemView(click = { @@ -132,6 +137,7 @@ private fun ChannelRelaysLayout( } } } + */ SectionBottomSpacer() } } diff --git a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chat/group/GroupMemberInfoView.kt b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chat/group/GroupMemberInfoView.kt index 0a7eba63a0..28cbb663a6 100644 --- a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chat/group/GroupMemberInfoView.kt +++ b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chat/group/GroupMemberInfoView.kt @@ -420,7 +420,8 @@ fun GroupMemberInfoLayout( @Composable fun ModeratorDestructiveSection() { val canBlockForAll = member.canBlockForAll(groupInfo) - val canRemove = member.canBeRemoved(groupInfo) + // TODO [relays] re-enable when relay management ships + val canRemove = member.canBeRemoved(groupInfo) && member.memberRole != GroupMemberRole.Relay if (canBlockForAll || canRemove) { SectionDividerSpaced(maxBottomPadding = false) SectionView {