another huge commit but we have notifs now yay
This commit is contained in:
parent
015a3e65e1
commit
998e8f2517
17 changed files with 442 additions and 52 deletions
|
@ -1,6 +1,8 @@
|
|||
import { Instance, server_types } from './instance.js';
|
||||
import * as api from './api.js';
|
||||
import { get, writable } from 'svelte/store';
|
||||
import { last_read_notif_id } from '$lib/notifications.js';
|
||||
import { user } from '$lib/stores/user.js';
|
||||
|
||||
export const client = writable(false);
|
||||
|
||||
|
@ -177,6 +179,7 @@ export class Client {
|
|||
host: this.instance.host,
|
||||
version: this.instance.version,
|
||||
},
|
||||
last_read_notif_id: get(last_read_notif_id),
|
||||
app: this.app,
|
||||
}));
|
||||
}
|
||||
|
@ -191,6 +194,7 @@ export class Client {
|
|||
return false;
|
||||
}
|
||||
this.instance = new Instance(saved.instance.host, saved.instance.version);
|
||||
last_read_notif_id.set(saved.last_read_notif_id || 0);
|
||||
this.app = saved.app;
|
||||
client.set(this);
|
||||
return true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue