From 24a25e9b9c004ac50366ce398b4c51675d9417e2 Mon Sep 17 00:00:00 2001 From: "lucas.nguyen" Date: Sun, 19 Jan 2025 14:25:15 +0700 Subject: [PATCH] Fix the issue button is visible beneath the ChannelAvatarView --- .../ChatChannelHeaderViewModifier.swift | 21 ++++++------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/Sources/StreamChatSwiftUI/ChatChannel/ChannelHeader/ChatChannelHeaderViewModifier.swift b/Sources/StreamChatSwiftUI/ChatChannel/ChannelHeader/ChatChannelHeaderViewModifier.swift index d77fcade7..03c4eeedd 100644 --- a/Sources/StreamChatSwiftUI/ChatChannel/ChannelHeader/ChatChannelHeaderViewModifier.swift +++ b/Sources/StreamChatSwiftUI/ChatChannel/ChannelHeader/ChatChannelHeaderViewModifier.swift @@ -64,12 +64,12 @@ public struct DefaultChatChannelHeader: ToolbarContent { resignFirstResponder() isActive = true } label: { - Rectangle() - .fill(Color(colors.background)) - .contentShape(Rectangle()) - .frame(width: 36, height: 36) - .clipShape(Circle()) - .offset(x: 8) + ChannelAvatarView( + avatar: headerImage, + showOnlineIndicator: onlineIndicatorShown, + size: CGSize(width: 36, height: 36) + ) + .offset(x: 4) } .accessibilityLabel(Text(L10n.Channel.Header.Info.title)) @@ -79,15 +79,6 @@ public struct DefaultChatChannelHeader: ToolbarContent { EmptyView() } .accessibilityHidden(true) - - ChannelAvatarView( - avatar: headerImage, - showOnlineIndicator: onlineIndicatorShown, - size: CGSize(width: 36, height: 36) - ) - .offset(x: 8) - .allowsHitTesting(false) - .accessibilityHidden(true) } .accessibilityIdentifier("ChannelAvatarView") }