From 639f4b422adb0a6fc809161dd816d8382cf88138 Mon Sep 17 00:00:00 2001 From: Owen Jacobson Date: Thu, 19 Jun 2025 11:33:17 -0400 Subject: 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. --- ui/lib/session.svelte.js | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'ui/lib/session.svelte.js') 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, }); } -- cgit v1.2.3