Open a chat on same screen

hi, i recently created a mobile social networking app and now i am into developing the same application for desktop user, the problem i am facing is that i want to make chat screen where users can see their conversation list and also click to open the chat on the same screen. please tell me how can i add this. here a photo of what i mean

Hi @dhumik,

You can do this with a little trick. Let’s assume you have Conversations and each conversation has an ID. You will also need to add a property to Users collection, call it ConvID.
Then you put 2 lists on this screen.

  • on the left side you will have a list of Conversations for Logged-in User. When you click on the conversation, instead of linking to another screen (like in the mobile app), you update Logged-in User → ConvID to the value from Current Conversation ->ID
  • on the right side you put the chat itself. BUT you “wrap” it into the list, make it a list of Conversations, and add a filter so that Conversation → ID is equal to Logged-in User → ConvID.

As a result you will have a list on the right which is filtered by the selected conversation on the left. To make things more “clean”, you can reset ConvID before you go to this screen (so that no conversation is selected) and make the list on the right conditionally visible, only when Logged-in User → ConvID is not equal to empty (leave the value blank).


1 Like

hello @Victor,
i tried what you said 3 time but didnt work, please explain how can i do it
thank you

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.