I am building a chat app using Socket.IO and I am curious about how I should show loading indicator when receiving message history.
Solutions i have so far:
- Add loading and loaded event
- Using setTimeout to check next message received time, (ex: set 1s timeout to set loading to false, but if within 1s received message then set loading true and clear previous timeout) (Not recommended btw)
Any other better solution regarding this?
Thanks before
via Hakutsuru
No comments:
Post a Comment