Skip to content
Snippets Groups Projects
Commit 0e9a8c0c authored by syuilo's avatar syuilo
Browse files

fix(client): Message read state is not reactive

parent 5ae8a3c7
No related branches found
No related tags found
No related merge requests found
......@@ -221,14 +221,20 @@ export default Vue.extend({
for (const id of x) {
if (this.messages.some(x => x.id == id)) {
const exist = this.messages.map(x => x.id).indexOf(id);
this.messages[exist].isRead = true;
this.messages[exist] = {
...this.messages[exist],
isRead: true,
};
}
}
} else if (this.group) {
for (const id of x.ids) {
if (this.messages.some(x => x.id == id)) {
const exist = this.messages.map(x => x.id).indexOf(id);
this.messages[exist].reads.push(x.userId);
this.messages[exist] = {
...this.messages[exist],
reads: [...this.messages[exist].reads, x.userId]
};
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment