Skip to content

Commit 86d7021

Browse files
committed
Fix the issue button is visible beneath the ChannelAvatarView
1 parent 609bba9 commit 86d7021

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

Sources/StreamChatSwiftUI/ChatChannel/ChannelHeader/ChatChannelHeaderViewModifier.swift

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,13 @@ public struct DefaultChatChannelHeader: ToolbarContent {
3535
}
3636

3737
public var channel: ChatChannel
38-
public var headerImage: UIImage
3938
@Binding public var isActive: Bool
4039

4140
public init(
4241
channel: ChatChannel,
43-
headerImage: UIImage,
4442
isActive: Binding<Bool>
4543
) {
4644
self.channel = channel
47-
self.headerImage = headerImage
4845
_isActive = isActive
4946
}
5047

@@ -71,6 +68,7 @@ public struct DefaultChatChannelHeader: ToolbarContent {
7168
.clipShape(Circle())
7269
.offset(x: 8)
7370
}
71+
.buttonStyle(.plain)
7472

7573
NavigationLink(isActive: $isActive) {
7674
LazyView(ChatChannelInfoView(channel: channel, shownFromMessageList: true))
@@ -79,7 +77,7 @@ public struct DefaultChatChannelHeader: ToolbarContent {
7977
}
8078

8179
ChannelAvatarView(
82-
avatar: headerImage,
80+
channel: channel,
8381
showOnlineIndicator: onlineIndicatorShown,
8482
size: CGSize(width: 36, height: 36)
8583
)
@@ -106,7 +104,6 @@ public struct DefaultChannelHeaderModifier: ChatChannelHeaderViewModifier {
106104
content.toolbar {
107105
DefaultChatChannelHeader(
108106
channel: channel,
109-
headerImage: channelHeaderLoader.image(for: channel),
110107
isActive: $isActive
111108
)
112109
}

0 commit comments

Comments
 (0)