From 2e2e3980ab78052be74f4007c343e69a583648fe Mon Sep 17 00:00:00 2001
From: Owen Jacobson <owen@grimoire.ca>
Date: Thu, 10 Oct 2024 22:30:18 -0400
Subject: Compute the active channel from the current routing state, not from a
 store.

---
 ui/lib/components/ActiveChannel.svelte | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

(limited to 'ui/lib/components/ActiveChannel.svelte')

diff --git a/ui/lib/components/ActiveChannel.svelte b/ui/lib/components/ActiveChannel.svelte
index 978e952..ece9f55 100644
--- a/ui/lib/components/ActiveChannel.svelte
+++ b/ui/lib/components/ActiveChannel.svelte
@@ -1,10 +1,11 @@
 <script>
-    import { activeChannel, messages } from '$lib/store';
+    import { messages } from '$lib/store';
     import Message from './Message.svelte';
 
-    let container;
-    $: messageList = $activeChannel.isSet() ? $messages.inChannel($activeChannel.get()) : [];
+    export let channel = null;
+    $: messageList = channel !== null ? $messages.inChannel(channel) : [];
 
+    let container;
     // TODO: eventually, store scroll height/last unread in channel? scroll there?
 
     let scroll = (message) => {
-- 
cgit v1.2.3

