AfrazCodes / SwiftChatApp

Realtime firebase chat app written in Swift 5
175 stars 66 forks source link

Issue with wiping Convo list when 3rd User sends a message #6

Closed Yiagstar closed 1 year ago

Yiagstar commented 1 year ago

Hey 😊 Thanks for such an amazing tutorial!

I am trying to solve an issue I have found since reaching the end of the YouTube videos & hope you have the time to advise? I would happily become a Patreon member in return 😂

So User A signs up, as does User B. Both can start a chat with each other but, in this case let's say User A starts the chat. Both convo lists update as they should and all is well.

The issue happens when User C signs up ....... If User A starts a chat with User C then everything is fine. User A's convo list updates to have 2 chats as it should. However, if User C starts the chat with User A then User A's convo list gets wiped completely.

The messages are in the Database still & User A is able to search for User B & C - successfully re-starting those chats with the existing messages available.

I have gone around in circles for a week now trying to solve it - any ideas would be amazing. Thanks again for a great tutorial.

Yiagstar commented 1 year ago

It was my error .... sorry! Again - amazing tutorial!