Restore user query buffer unread status

This commit is contained in:
Simon Ser
2021-08-23 12:25:43 +02:00
parent 016ca27f2d
commit c47af780f6
2 changed files with 30 additions and 2 deletions

View File

@@ -65,14 +65,23 @@ export class Buffer {
}
put(buf) {
let key = this.key(buf);
let prev = this.m.get(key);
if (prev && prev.unread === buf.unread) {
return;
}
this.m.set(this.key(buf), {
name: buf.name,
unread: buf.unread,
server: {
url: buf.server.url,
nick: buf.server.nick,
bouncerNetwork: buf.server.bouncerNetwork,
},
});
this.save();
}