Currently the information about chats, like last message, personal, and the title is also stored with all the messages in the same document. The messages can be a lot and in firebase you can't fetch a small part of a document so we will have to split the metadata and the actual messages of a chat into 2 seperate collections. For the chatoverview screen we only fetch the metadata and when you click on a chat it will fetch all the messages of that chat.
Currently the information about chats, like last message, personal, and the title is also stored with all the messages in the same document. The messages can be a lot and in firebase you can't fetch a small part of a document so we will have to split the metadata and the actual messages of a chat into 2 seperate collections. For the chatoverview screen we only fetch the metadata and when you click on a chat it will fetch all the messages of that chat.