It was a hard decision, but finally, I made it. I removed the group chat functionality from the code. It’s not permanent, but for the time being, that’s how it’s going to stay.
I want to achieve two main goals in my work. One is to deliver as many features as I can, and the other is to provide a clean, robust code that’s more or less easy to understand. And, it’s not always easy to do both at the same time.
In this case, for me at least, it was impossible. The user management needed to be refactored, and the group chat functionality couldn’t find a way to work with the new database structure. I haven't given up though. I will try to bring the private and the group chat functionalities back together again in the future. But for now, we’ll be continuing with just the new, polished private chat.
As I mentioned, the user management – especially the way we store the user related info at Firebase – has been completely refactored. The current database structure is much more suitable for using the app with a large number of users.
Several minor changes have also been made along with a few bug fixes. Please check the latest implementation and let me know what you think.