rpaschoal / ng-chat

💬 A simple facebook/linkedin lookalike chat module for Angular applications.
MIT License
155 stars 92 forks source link

Problems when listing friends #117

Closed Nesbox314 closed 5 years ago

Nesbox314 commented 5 years ago

Hello, I'm trying to use ng-chat in a personal project, and at the moment I'm implementing the listFriends () method;

The problem I am facing is that the chat loads very fast, and the request has a lot of data, about 260 people, and when loading very fast, the method listFriends is finalized before the subscribe ends, leaving the chat without data. Is there any way to make the list friends method wait for the observable, or execute a method before the listFriends is executed?

See example image

I tried creating methods run after, or passing the result through localStorage, but nothing worked. Any tip is great.

rpaschoal commented 5 years ago

Hi @Nesbox314 ,

Is this still an issue? Would you be able to provide some reproduction code for this?