Unable to wrap ChannelList height due to internal LazyColumn .fillMaxSize()
I am trying to wrap the height of a ChannelList, so I can place a view directly under the list of channels, but I am unable to do this dynamically. This line https://github.com/GetStream/stream-chat-android/blob/develop/stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/channels/list/Channels.kt#L85 prevents me from being able to wrap the ChannelList height, as the internal LazyColumn takes up the full view. I would like to propose that the SDK provide the option to .wrapContentHeight() to this LazyColumn.
In this image you can see I'm able to get close to what I want. The red box is the ChannelList which I predefined the .height to the size of 2 channels. The "Contact" section and below is my own custom view. I would like this section to be placed dynamically under the list of channels regardless of the # of channels.
Hi @askirk,
Thank you for bringing this up! We will analyse this request and see if it would be possible to make this change without breaking any other functionality. I will keep you posted on the progress!
One follow up question for better clarity: The Channels composable internally also handles the pagination. So when a user scrolls to the bottom of the channel list, a new page of channels is fetched, and while the operation is in progress, a 'loading item' is shown bellow the last loaded channel. So this could potentially interfere with any custom components placed bellow the ChannelList.
So I was wondering if the component that you want to place under the ChannelList should act as the last item in the list (and be scrollable with the ChannelList together)? Or do you want the "Contact" component to always be visible, and have the ChannelList scrollable 'behind' it?
Best regards, Petar
This issue has been automatically closed because there has been no response to our request from the original author. Please don't hesitate to comment on the bug if you have any more information for us - we will reopen it right away! Thanks for your contribution.
So I was wondering if the component that you want to place under the ChannelList should act as the last item in the list (and be scrollable with the ChannelList together)? Or do you want the "Contact" component to always be visible, and have the ChannelList scrollable 'behind' it?
To answer your question, I was looking to implement the second option. To have the ChannelList scroll "behind" my own component.