Iconica-Development / flutter_chat

Add a (personal or group) chat to your Flutter-application.
BSD 3-Clause "New" or "Revised" License
2 stars 0 forks source link

Only create the chat after a first message is sent #97

Open freekvandeven opened 2 months ago

freekvandeven commented 2 months ago

You now have to create a chat before you can route to it. In wellqom and other projects this can cause for a lot of empty chats which the user can delete themselves but it doesn't look nice. In the case of personal chats (and maybe groupchats as well) you should be able to go to that screen without the chat existing in the database yet. Once you type the first message the chat will be created. Maybe it would also be nice to either have a button to just create the groupchat without having to type a message or have a clear text indicating you need to type something for the chat to stay.

FlutterJoey commented 2 months ago

I think this is a valid solution, and a logical one. We do not need to consider same-time chat creation so we cannot just create the chat under a random uuid. This might cause 2 chats to be created between the same people. Especially with bad internet connection and a local firebase cache, this will result in some unexpected behaviour.