summaryrefslogtreecommitdiff
path: root/ui/lib/session.svelte.js
diff options
context:
space:
mode:
authorOwen Jacobson <owen@grimoire.ca>2025-06-19 11:33:17 -0400
committerOwen Jacobson <owen@grimoire.ca>2025-06-20 22:27:37 -0400
commit639f4b422adb0a6fc809161dd816d8382cf88138 (patch)
treea84ed9111fbdab697af6e1bd3c2275a5b955a6c3 /ui/lib/session.svelte.js
parent4b522c804db8155f74a734c95ed962d996b2c692 (diff)
Boot the client by consuming events.
We use the same event processing glue that the client has for keeping up with live events, which means that a significant chunk of state management code goes away entirely.
Diffstat (limited to 'ui/lib/session.svelte.js')
-rw-r--r--ui/lib/session.svelte.js12
1 files changed, 4 insertions, 8 deletions
diff --git a/ui/lib/session.svelte.js b/ui/lib/session.svelte.js
index d742dbe..838401c 100644
--- a/ui/lib/session.svelte.js
+++ b/ui/lib/session.svelte.js
@@ -64,27 +64,23 @@ class Session {
),
);
- static boot({ user, users, channels, messages, resume_point, heartbeat }) {
+ static boot({ user, resume_point, heartbeat, events }) {
const remote = r.State.boot({
currentUser: user,
- users,
- channels,
- messages,
resumePoint: resume_point,
heartbeat,
+ events,
});
const local = l.Channels.fromLocalStorage();
return new Session(remote, local);
}
- reboot({ user, users, channels, messages, resume_point, heartbeat }) {
+ reboot({ user, resume_point, heartbeat, events }) {
this.remote = r.State.boot({
currentUser: user,
- users,
- channels,
- messages,
resumePoint: resume_point,
heartbeat,
+ events,
});
}