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:
parent
c470c9f2c0
commit
aa9ce73d5a
2 changed files with 28 additions and 16 deletions
6
store.js
6
store.js
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue