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

Messages not "grouping" when using copy of default message widget.

Open BrunoJurkovic opened this issue 3 years ago • 1 comments

Which packages are you using?

stream_chat_flutter

On what platforms did you experience the issue?

iOS, Android

What version are you using?

stream_chat_flutter: ^4.6.0

What happened?

Our chat design requires us to change the default StreamMessageWidget, nothing much, but moving around a few components (not changing any functionality), but for some reason, when we change the message type, we lose the functionality of messages being sent "together", or "grouped". Instead, every message is sent independently, with a timestamp separating each message.

I understand you cannot provide me with a lot of info without us sharing the code, could you maybe tell me where I could find the logic behind messages being grouped?

Steps to reproduce

1. Make a copy of `StreamMessageWidget` and make necessary style changes
2. Replace `messageBuilder`'s `defaultMessageWidget` with our custom widget
3. Messages not being grouped.

Supporting info to reproduce

Changes we made:

Moved bottom row to the top of the message, added read indicator as always present, moved profile picture to be fixed at the top of the message.

Relevant log output

No response

Flutter analyze output

No response

Flutter doctor output

No response

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct

BrunoJurkovic avatar Oct 11 '22 09:10 BrunoJurkovic

@imtoori Any idea what may be causing this?

BrunoJurkovic avatar Oct 12 '22 13:10 BrunoJurkovic

Can we get some info for this?

BrunoJurkovic avatar Oct 17 '22 13:10 BrunoJurkovic

hey @BrunoJurkovic sorry for the delay, I'm looking into this

imtoori avatar Oct 17 '22 13:10 imtoori

hey @BrunoJurkovic sorry for the delay, I'm looking into this

No worries :), just letting you know, this maybe has to do with some of the properties we changed in the .copyWith method. Removing each one by one does not fix this, so I'm thinking this is a combination.

If you could point out the specific code piece which is determining if the message should be grouped to the top (or bottom) message, please share it, since we need to modify this behavior to fit our use case.

Thanks for the help, as always, Salvatore 😄

BrunoJurkovic avatar Oct 17 '22 14:10 BrunoJurkovic