stream-chat-react icon indicating copy to clipboard operation
stream-chat-react copied to clipboard

bug:ChannelList duplicating channels in view

Open leticiafontoura opened this issue 1 year ago • 0 comments

Describe the bug

I'm using this demo as my foundation

My Channel List component renders channels from 9 to 9 - so my "limit" is always 9 and my offset varies on each click on my "load more" button.

This works perfectly. Except when I have the following scenario:

  • i have 9 channels rendered on screen
  • i dont need to load more channels (i have more, i just dont need to talk to them at this moment)
  • channel number 13 sends me a message: well, it wasn't rendered at first, but then if a new message is received, it gets to the top of my channel list, which is expected
  • now i have 10 channels rendered on screen
  • when i click the load more button, what happens is: the last rendered channel is duplicated when the other 9 channels are loaded. no idea why. really.

Expected behavior

I thought it should not duplicate the last channel.

Screenshots

I'm not sure if I can provide the demo video for you, but if I do, I'll share it later.

stream-chat: "^6.6.0", stream-chat-react: "^9.1.3"

Desktop (please complete the following information):

OS: [e.g. iOS] macOS Browser [e.g. chrome, safari] chrome (any)

leticiafontoura avatar Sep 14 '22 20:09 leticiafontoura