Skip to content

Commit 5a16b93

Browse files
Improved channel header on iOS 14
1 parent fae1496 commit 5a16b93

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

Sources/StreamChatSwiftUI/ChatChannel/ChannelHeader/ChatChannelHeaderViewModifier.swift

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,23 @@ public struct DefaultChatChannelHeader: ToolbarContent {
5151
}
5252

5353
ToolbarItem(placement: .navigationBarTrailing) {
54-
NavigationLink(destination: ChatChannelInfoView(channel: channel)) {
54+
ZStack {
55+
NavigationLink(destination: LazyView(ChatChannelInfoView(channel: channel))) {
56+
Rectangle()
57+
.fill(Color(colors.background))
58+
.contentShape(Rectangle())
59+
.frame(width: 36, height: 36)
60+
.clipShape(Circle())
61+
.offset(x: 8)
62+
}
63+
5564
ChannelAvatarView(
5665
avatar: headerImage,
5766
showOnlineIndicator: onlineIndicatorShown,
5867
size: CGSize(width: 36, height: 36)
5968
)
6069
.offset(x: 8)
70+
.allowsHitTesting(false)
6171
}
6272
}
6373
}

Sources/StreamChatSwiftUI/ChatChannelList/ChatChannelHelperViews.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ public struct AvatarView: View {
4545

4646
public var body: some View {
4747
Image(uiImage: avatar)
48+
.renderingMode(.original)
4849
.resizable()
4950
.aspectRatio(contentMode: .fill)
5051
.frame(

0 commit comments

Comments
 (0)