summaryrefslogtreecommitdiff
path: root/ui/lib/state/remote/channels.svelte.js
diff options
context:
space:
mode:
authorOwen Jacobson <owen@grimoire.ca>2025-05-14 00:46:13 -0400
committerOwen Jacobson <owen@grimoire.ca>2025-05-14 00:46:59 -0400
commitae93188f0f4f36086622636ba9ae4810cbd1f8c9 (patch)
tree3187eaaf5b6391bfe8e135c829bcee47feed41ea /ui/lib/state/remote/channels.svelte.js
parent63291a543aac293d91f2f64faf47bb48886b59c4 (diff)
Move derivation of the synthesized view of channels (and messages) into `session`.
Diffstat (limited to 'ui/lib/state/remote/channels.svelte.js')
-rw-r--r--ui/lib/state/remote/channels.svelte.js5
1 files changed, 2 insertions, 3 deletions
diff --git a/ui/lib/state/remote/channels.svelte.js b/ui/lib/state/remote/channels.svelte.js
index b6da31b..8b190dd 100644
--- a/ui/lib/state/remote/channels.svelte.js
+++ b/ui/lib/state/remote/channels.svelte.js
@@ -1,5 +1,4 @@
import { DateTime } from 'luxon';
-import { SvelteMap } from 'svelte/reactivity';
class Channel {
static boot({ at, id, name }) {
@@ -18,10 +17,10 @@ class Channel {
}
export class Channels {
- all = $state();
+ all = $state([]);
static boot(channels) {
- const all = new SvelteMap(channels.map((channel) => [channel.id, Channel.boot(channel)]));
+ const all = channels.map((channel) => Channel.boot(channel));
return new Channels({ all });
}