Comments (8)
I believe you need to set this.loadingRooms = true
, fetch your list, then this.loadingRooms = false
from vue-advanced-chat.
RoomList area loading is works well.
But room area is still loading...
I sent screen record file to email. (yellow button is refresh room buttion.)
from vue-advanced-chat.
Maybe this can help: #40 (comment)
from vue-advanced-chat.
I already changed messageLoaded props.
I think room data is not initialized when rooms props was setted empty array [].(like above image)
Actually I want to unselect(or refresh) room data feature when I set rooms props to empty array. (fetchMessages event is not emitted.)
from vue-advanced-chat.
Would you be able to share here your full component code snippet so I can reproduce the issue?
from vue-advanced-chat.
I found issue. The cause of the issue is that I put them in rooms prop sequentially when I get room list to server.
I changed it to put it at once.
before
getRooms() {
this.rooms = []
getChannels().then(async res => {
for (let i = 0; i < res.channels.length; i++) {
if (!res.channels[i].name.startsWith('chat_')) {
continue
}
let members = await this.getChannelMembers(res.channels[i]._id);
const room = {
roomId: res.channels[i]._id,
roomName: res.channels[i].name,
users: members.members,
type: 'channel',
offset: 0,
unreadCount: 0,
}
await this.subRoom(room)
this.rooms.push(room)
}
})
}
after
getRooms() {
let rooms = []
getChannels().then(async res => {
for (let i = 0; i < res.channels.length; i++) {
if (!res.channels[i].name.startsWith('chat_')) {
continue
}
let members = await this.getChannelMembers(res.channels[i]._id);
const room = {
roomId: res.channels[i]._id,
roomName: res.channels[i].name,
users: members.members,
type: 'channel',
offset: 0,
unreadCount: 0,
}
await this.subRoom(room)
rooms.push(room)
}
this.rooms = rooms
})
}
from vue-advanced-chat.
Ok cool. I will have a look and check if I can allow the first method to work as well.
from vue-advanced-chat.
Actually, I will not change the current behaviour as it may lead to performance issues.
Instead, I added guidelines in the readme:
https://github.com/antoine92190/vue-advanced-chat#important-notes
from vue-advanced-chat.
Related Issues (20)
- Too wide emoji block
- `link-options` not working
- Support to use the ChatWindow component directly
- Found error img.path not defined
- Can you support limiting the number of uploaded files
- [Feature Request] emit event when user focuses/blurs in message input field
- event fetch-more-rooms not working HOT 1
- room without message HOT 1
- templatesText bug: Input "/help" not working
- Spinner still there even when setting messages-loaded to true HOT 1
- Can you release a new version
- Will you release a new version HOT 2
- URGENT ** 2.0.8 NPMJS Package Missing Files | Broken HOT 2
- How to send a message with a file
- vue-tsc --noEmit && vite build fails
- Cannot read properties of undefined (reading 'roomId') HOT 1
- Editing a message to include a reply emits `send-message` instead
- Room message search
- Room list as slot does not update order after sorting?
- How to run locally for development HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vue-advanced-chat.