mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-10-22 19:42:13 +00:00
core, ui: prohibit to invite contact to channel (#6731)
This commit is contained in:
1 parent
a5f606f44a
commit
dfd8e224f6
4 files changed
+60
-45
No files matched your search
@@ -253,6 +253,18 @@ struct ChatView: View {
|
||||
AddGroupMembersView(chat: chat, groupInfo: groupInfo)
|
||||
}
|
||||
}
|
||||
.appSheet(isPresented: $showGroupLinkSheet) {
|
||||
if case let .group(groupInfo, _) = cInfo {
|
||||
GroupLinkView(
|
||||
groupId: groupInfo.groupId,
|
||||
groupLink: $groupLink,
|
||||
groupLinkMemberRole: $groupLinkMemberRole,
|
||||
showTitle: true,
|
||||
creatingGroup: false,
|
||||
isChannel: groupInfo.useRelays
|
||||
)
|
||||
}
|
||||
}
|
||||
.sheet(isPresented: Binding(
|
||||
get: { !forwardedChatItems.isEmpty },
|
||||
set: { isPresented in
|
||||
@@ -579,17 +591,8 @@ struct ChatView: View {
|
||||
contentFilterMenu(withLabel: false)
|
||||
Menu {
|
||||
if groupInfo.canAddMembers {
|
||||
if (chat.chatInfo.incognito) {
|
||||
if chat.chatInfo.incognito || groupInfo.useRelays {
|
||||
groupLinkButton()
|
||||
.appSheet(isPresented: $showGroupLinkSheet) {
|
||||
GroupLinkView(
|
||||
groupId: groupInfo.groupId,
|
||||
groupLink: $groupLink,
|
||||
groupLinkMemberRole: $groupLinkMemberRole,
|
||||
showTitle: true,
|
||||
creatingGroup: false
|
||||
)
|
||||
}
|
||||
} else {
|
||||
addMembersButton()
|
||||
}
|
||||
@@ -1438,7 +1441,11 @@ struct ChatView: View {
|
||||
}
|
||||
}
|
||||
} label: {
|
||||
Label("Group link", systemImage: "link.badge.plus")
|
||||
if case let .group(gInfo, _) = chat.chatInfo, gInfo.useRelays {
|
||||
Label("Channel link", systemImage: "link")
|
||||
} else {
|
||||
Label("Group link", systemImage: "link.badge.plus")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user