Skip to content

Commit 5f1afcb

Browse files
committed
Fix the issue button is visible beneath the ChannelAvatarView
1 parent a9084a7 commit 5f1afcb

File tree

1 file changed

+6
-14
lines changed

1 file changed

+6
-14
lines changed

Sources/StreamChatSwiftUI/ChatChannel/ChannelHeader/ChatChannelHeaderViewModifier.swift

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -64,27 +64,19 @@ public struct DefaultChatChannelHeader: ToolbarContent {
6464
resignFirstResponder()
6565
isActive = true
6666
} label: {
67-
Rectangle()
68-
.fill(Color(colors.background))
69-
.contentShape(Rectangle())
70-
.frame(width: 36, height: 36)
71-
.clipShape(Circle())
72-
.offset(x: 8)
67+
ChannelAvatarView(
68+
avatar: headerImage,
69+
showOnlineIndicator: onlineIndicatorShown,
70+
size: CGSize(width: 36, height: 36)
71+
)
72+
.offset(x: 4)
7373
}
7474

7575
NavigationLink(isActive: $isActive) {
7676
LazyView(ChatChannelInfoView(channel: channel, shownFromMessageList: true))
7777
} label: {
7878
EmptyView()
7979
}
80-
81-
ChannelAvatarView(
82-
avatar: headerImage,
83-
showOnlineIndicator: onlineIndicatorShown,
84-
size: CGSize(width: 36, height: 36)
85-
)
86-
.offset(x: 8)
87-
.allowsHitTesting(false)
8880
}
8981
.accessibilityIdentifier("ChannelAvatarView")
9082
}

0 commit comments

Comments
 (0)