You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the server returns an empty list of messages, the message window shows a message No messages for the first room, but shows an infinite loader for the others.
Starting with messages = [] and messagesLoaded = false.
I simulate an empty response from the server by setting messagesLoaded = true.
When I select another chat room, the infinite loader remains visible.
Expected behavior
The message window should display No messages if the server returns an empty list of messages.
Screenshots
Device (please complete the following information)
OS: Fedora 38
Browser: Chrome 113.0.5672.126, Firefox 113.0.1
Package version: 2.0.7
The text was updated successfully, but these errors were encountered:
Hmm, I think I found the solution by writing this issue.
messagesLoaded must be reset to false before requesting the messages for the newly selected room. Thus it will reset the "loading state" of the message window. And eventually set it back to true when the messages are loaded.
First, thank you for your amazing plugin!
Describe the bug
When the server returns an empty list of messages, the message window shows a message No messages for the first room, but shows an infinite loader for the others.
Steps to reproduce
Here is a repo to reproduce the issue: https://github.com/despatates/vue-advanced-chat-sandbox
Starting with
messages = []
andmessagesLoaded = false
.I simulate an empty response from the server by setting
messagesLoaded = true
.When I select another chat room, the infinite loader remains visible.
Expected behavior
The message window should display No messages if the server returns an empty list of messages.
Screenshots
Device (please complete the following information)
The text was updated successfully, but these errors were encountered: