Skip to content

Commit 4f2240c

Browse files
committed
(demo) fix lastMessage reorder glitch
1 parent 19b7bb4 commit 4f2240c

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

demo/src/ChatContainer.vue

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -240,10 +240,8 @@ export default {
240240
// this.incrementDbCounter('Listen Last Room Message', messages.size)
241241
messages.forEach(message => {
242242
const lastMessage = this.formatLastMessage(message.data())
243-
this.$set(this.rooms, index, {
244-
...this.rooms[index],
245-
lastMessage
246-
})
243+
this.rooms[index].lastMessage = lastMessage
244+
this.rooms = [...this.rooms]
247245
})
248246
if (this.loadingLastMessageByRoom < this.rooms.length) {
249247
this.loadingLastMessageByRoom++

0 commit comments

Comments
 (0)