You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have implemented a CustomFactory. I'm already customizing the ChatChannelView, which gets invoked fine in makeChannelDestination(). However, the custom ChannelHeaderView doesn't show. I followed the tutorial to customize the ChannelHeaderView, even using the exact code. However, the makeChannelHeaderViewModifier(for channel: ChatChannel) func doesn't get invoked.
I'm not sure what I'm missing here...
What did you expect to happen?
I expected the makeChannelHeaderViewModifier(for channel: ChatChannel) to be called, thus allowing my ChannelHeaderView to be displayed.
/// View modifier for customizing the channel header.publicprotocolChatChannelHeaderViewModifier:ViewModifier{varchannel:ChatChannel{get}}
from your code then it will work. This protocol is defined in StreamChatSwiftUI and redefining the protocol in your app's module made the CustomChatChannelModifier to conform to <yourappmodule>.ChatChannelHeaderViewModifier and not to the StreamChatSwiftUI.ChatChannelHeaderViewModifier as required by the ViewFactory protocol.
What did you do?
I have implemented a
CustomFactory
. I'm already customizing theChatChannelView
, which gets invoked fine inmakeChannelDestination()
. However, the customChannelHeaderView
doesn't show. I followed the tutorial to customize theChannelHeaderView
, even using the exact code. However, themakeChannelHeaderViewModifier(for channel: ChatChannel)
func doesn't get invoked.I'm not sure what I'm missing here...
What did you expect to happen?
I expected the
makeChannelHeaderViewModifier(for channel: ChatChannel)
to be called, thus allowing myChannelHeaderView
to be displayed.What happened instead?
The default UI is showing.
GetStream Environment
GetStream Chat version: 4.5.7
GetStream Chat frameworks: StreamChat, StreamChatSwiftUI: 4.57.0
iOS version: 17.2
Swift version: 5.10
Xcode version: 15.4
Device: Sim iPhone 15 Pro + iOS 17.2
Additional context
I followed this tutorial: https://getstream.io/chat/docs/sdk/ios/swiftui/swiftui-cookbook/custom-channel-header/
Code:
The text was updated successfully, but these errors were encountered: