From e5d590fccd5b8ecddfc7740b645c27ddf0032a72 Mon Sep 17 00:00:00 2001 From: Khalid Date: Wed, 1 Oct 2025 14:28:34 +0300 Subject: [PATCH 1/5] open ChannelInfoViewModel control proprties --- .../ChatChannel/ChannelInfo/ChatChannelInfoViewModel.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Sources/StreamChatSwiftUI/ChatChannel/ChannelInfo/ChatChannelInfoViewModel.swift b/Sources/StreamChatSwiftUI/ChatChannel/ChannelInfo/ChatChannelInfoViewModel.swift index 9c1c474c..4c9051f5 100644 --- a/Sources/StreamChatSwiftUI/ChatChannel/ChannelInfo/ChatChannelInfoViewModel.swift +++ b/Sources/StreamChatSwiftUI/ChatChannel/ChannelInfo/ChatChannelInfoViewModel.swift @@ -36,7 +36,7 @@ open class ChatChannelInfoViewModel: ObservableObject, ChatChannelControllerDele @Published public var addUsersShown = false @Published public var selectedParticipant: ParticipantInfo? - public var shouldShowLeaveConversationButton: Bool { + open var shouldShowLeaveConversationButton: Bool { if channel.isDirectMessageChannel { channel.ownCapabilities.contains(.deleteChannel) } else { @@ -44,11 +44,11 @@ open class ChatChannelInfoViewModel: ObservableObject, ChatChannelControllerDele } } - public var canRenameChannel: Bool { + open var canRenameChannel: Bool { channel.ownCapabilities.contains(.updateChannel) } - public var shouldShowAddUserButton: Bool { + open var shouldShowAddUserButton: Bool { if channel.isDirectMessageChannel { false } else { From 55b5a0bad5ae032b4c7a5a9777afaf3c34f6df31 Mon Sep 17 00:00:00 2001 From: Khalid Date: Thu, 2 Oct 2025 12:29:56 +0300 Subject: [PATCH 2/5] fix ios26 navigationBarTrailing style --- .../ChatChannel/ChannelInfo/ChatChannelInfoView.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/Sources/StreamChatSwiftUI/ChatChannel/ChannelInfo/ChatChannelInfoView.swift b/Sources/StreamChatSwiftUI/ChatChannel/ChannelInfo/ChatChannelInfoView.swift index 7c0d9abc..a0b2d4bb 100644 --- a/Sources/StreamChatSwiftUI/ChatChannel/ChannelInfo/ChatChannelInfoView.swift +++ b/Sources/StreamChatSwiftUI/ChatChannel/ChannelInfo/ChatChannelInfoView.swift @@ -170,6 +170,7 @@ public struct ChatChannelInfoView: View, KeyboardReadable .background(colors.tintColor) .clipShape(Circle()) } + .buttonStyle(.plain) } } } From 562d874f9849a2f08fa168effe2b7a6f23c5b042 Mon Sep 17 00:00:00 2001 From: Khalid Date: Thu, 16 Oct 2025 14:44:03 +0300 Subject: [PATCH 3/5] open mute channel control property for ChannelInfoViewModel --- .../ChannelInfo/ChatChannelInfoHelperViews.swift | 16 +++++++++------- .../ChannelInfo/ChatChannelInfoViewModel.swift | 4 ++++ 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/Sources/StreamChatSwiftUI/ChatChannel/ChannelInfo/ChatChannelInfoHelperViews.swift b/Sources/StreamChatSwiftUI/ChatChannel/ChannelInfo/ChatChannelInfoHelperViews.swift index d5f7a9f3..8676db76 100644 --- a/Sources/StreamChatSwiftUI/ChatChannel/ChannelInfo/ChatChannelInfoHelperViews.swift +++ b/Sources/StreamChatSwiftUI/ChatChannel/ChannelInfo/ChatChannelInfoHelperViews.swift @@ -76,13 +76,15 @@ public struct ChatInfoOptionsView: View { Divider() - ChannelInfoItemView( - icon: images.muted, - title: viewModel.mutedText, - verticalPadding: 12 - ) { - Toggle(isOn: $viewModel.muted) { - EmptyView() + if viewModel.shouldShowMuteChannelButton { + ChannelInfoItemView( + icon: images.muted, + title: viewModel.mutedText, + verticalPadding: 12 + ) { + Toggle(isOn: $viewModel.muted) { + EmptyView() + } } } diff --git a/Sources/StreamChatSwiftUI/ChatChannel/ChannelInfo/ChatChannelInfoViewModel.swift b/Sources/StreamChatSwiftUI/ChatChannel/ChannelInfo/ChatChannelInfoViewModel.swift index 4c9051f5..cf0620fe 100644 --- a/Sources/StreamChatSwiftUI/ChatChannel/ChannelInfo/ChatChannelInfoViewModel.swift +++ b/Sources/StreamChatSwiftUI/ChatChannel/ChannelInfo/ChatChannelInfoViewModel.swift @@ -43,6 +43,10 @@ open class ChatChannelInfoViewModel: ObservableObject, ChatChannelControllerDele channel.ownCapabilities.contains(.leaveChannel) } } + + open var shouldShowMuteChannelButton: Bool { + channel.ownCapabilities.contains(.muteChannel) + } open var canRenameChannel: Bool { channel.ownCapabilities.contains(.updateChannel) From b00daffa5a17e1dd591c63d9bfed96d3c0b4b6b3 Mon Sep 17 00:00:00 2001 From: Khalid Date: Thu, 16 Oct 2025 15:49:12 +0300 Subject: [PATCH 4/5] open channel info leave actions title --- .../ChatChannel/ChannelInfo/ChatChannelInfoViewModel.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/StreamChatSwiftUI/ChatChannel/ChannelInfo/ChatChannelInfoViewModel.swift b/Sources/StreamChatSwiftUI/ChatChannel/ChannelInfo/ChatChannelInfoViewModel.swift index cf0620fe..32a1c761 100644 --- a/Sources/StreamChatSwiftUI/ChatChannel/ChannelInfo/ChatChannelInfoViewModel.swift +++ b/Sources/StreamChatSwiftUI/ChatChannel/ChannelInfo/ChatChannelInfoViewModel.swift @@ -91,7 +91,7 @@ open class ChatChannelInfoViewModel: ObservableObject, ChatChannelControllerDele } } - public var leaveButtonTitle: String { + open var leaveButtonTitle: String { if channel.isDirectMessageChannel { L10n.Alert.Actions.deleteChannelTitle } else { @@ -99,7 +99,7 @@ open class ChatChannelInfoViewModel: ObservableObject, ChatChannelControllerDele } } - public var leaveConversationDescription: String { + open var leaveConversationDescription: String { if channel.isDirectMessageChannel { L10n.Alert.Actions.deleteChannelMessage } else { From 19e65dc2722984ff454f37305eca5bce41e5cfd3 Mon Sep 17 00:00:00 2001 From: Khalid Date: Fri, 17 Oct 2025 14:26:26 +0300 Subject: [PATCH 5/5] cleanup --- .../ChatChannel/ChannelInfo/ChatChannelInfoView.swift | 1 - 1 file changed, 1 deletion(-) diff --git a/Sources/StreamChatSwiftUI/ChatChannel/ChannelInfo/ChatChannelInfoView.swift b/Sources/StreamChatSwiftUI/ChatChannel/ChannelInfo/ChatChannelInfoView.swift index a0b2d4bb..7c0d9abc 100644 --- a/Sources/StreamChatSwiftUI/ChatChannel/ChannelInfo/ChatChannelInfoView.swift +++ b/Sources/StreamChatSwiftUI/ChatChannel/ChannelInfo/ChatChannelInfoView.swift @@ -170,7 +170,6 @@ public struct ChatChannelInfoView: View, KeyboardReadable .background(colors.tintColor) .clipShape(Circle()) } - .buttonStyle(.plain) } } }