Restore channel unread status from local storage

Closes: https://todo.sr.ht/~emersion/gamja/75
Closes: https://todo.sr.ht/~emersion/gamja/89
This commit is contained in:
Simon Ser 2021-08-23 14:17:58 +02:00
parent c470c9f2c0
commit aa9ce73d5a
2 changed files with 28 additions and 16 deletions

View file

@ -64,6 +64,10 @@ export class Buffer {
}
}
get(buf) {
return this.m.get(this.key(buf));
}
put(buf) {
let key = this.key(buf);
@ -90,7 +94,7 @@ export class Buffer {
this.save();
}
load(server) {
list(server) {
let buffers = [];
for (const buf of this.m.values()) {
if (buf.server.url !== server.url || buf.server.nick !== server.nick || buf.server.bouncerNetwork !== server.bouncerNetwork) {