summaryrefslogtreecommitdiff
path: root/ui/lib/components/ActiveChannel.svelte
diff options
context:
space:
mode:
authorOwen Jacobson <owen@grimoire.ca>2024-10-10 22:30:18 -0400
committerOwen Jacobson <owen@grimoire.ca>2024-10-10 23:08:36 -0400
commit2e2e3980ab78052be74f4007c343e69a583648fe (patch)
treee791f18ee018a504db6da4939a8b82d1d84fe725 /ui/lib/components/ActiveChannel.svelte
parent1798988c5bc6ad8c2286848df14c7fa478e135d1 (diff)
Compute the active channel from the current routing state, not from a store.
Diffstat (limited to 'ui/lib/components/ActiveChannel.svelte')
-rw-r--r--ui/lib/components/ActiveChannel.svelte7
1 files changed, 4 insertions, 3 deletions
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) => {