chore(chats): improve chats so that the Dioxus key field can prevent unnecessary re-renders
when a conversation is displayed, messages are "grouped". I think that messages should be grouped in a way that doesn't require rendering additional elements. Currently the additional elements involve MessageGroups, GroupedMessages, etc. I think that doing this results in all the messages being re-rendered when the app re-renders.
current steps to render messages:
render_message_groups

render_message_group

MessageGroup

render_messages

render_message

All this serves to do is wrap the messages in a CSS class that changes the color or some of the pixels in one of the corners of the chat bubbles:

I think we should take the list of messages and in a single loop/iterator, on the fly, calculate which messages should be grouped.
Such a change would allow for the Dioxus key field to prevent unnecessary re-renders and greatly simplify the code.
there's a branch called refactor/messages2 which tries to fix this. It's a work in progress. if anyone else wants to take the ticket, that branch is probably a good place to start.
This is part of the state rework that @Flemmli97 has been working on.