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 want to display a channel list with some filtering options:
Searching, filtering unreads and group chats.
If possible, how can you achieve this currently?
I need to create a ChatChannelListController and use synchronize and delegates, wrap it in a viewmodel and expose it to my custom SwiftUI view using @Published. Which is not ideal given that StreamChat provides a state layer promising async/await and observation.
What would be the better way?
ChannelList in the state layer should have some method like updateFilter that would refresh the query, the same way ChatChannelListController does it. So we could use modern async/await + @Published and re-render views automatically when filtering changes.
I tried to create a wrapper viewmodel class that would just create queries and channels based on filter and then just call .get() whenever the filter changes. But that stops realtime updates for some reason.
What are you trying to achieve?
I want to display a channel list with some filtering options:
Searching, filtering unreads and group chats.
If possible, how can you achieve this currently?
I need to create a
ChatChannelListController
and use synchronize and delegates, wrap it in a viewmodel and expose it to my custom SwiftUI view using@Published
. Which is not ideal given that StreamChat provides a state layer promising async/await and observation.What would be the better way?
ChannelList
in the state layer should have some method likeupdateFilter
that would refresh the query, the same wayChatChannelListController
does it. So we could use modern async/await +@Published
and re-render views automatically when filtering changes.I tried to create a wrapper viewmodel class that would just create queries and channels based on filter and then just call .get() whenever the filter changes. But that stops realtime updates for some reason.
GetStream Environment
GetStream Chat version: 4.67.0
GetStream Chat frameworks:
iOS version: 18.0
Swift version: 5.9
Xcode version: 15.1
Device: iPhone 16 Simulator
Additional context
Maybe I am doing something wrong but I don't know how to approach this using
ChannelList
The text was updated successfully, but these errors were encountered: