From 8edd5625ad5dde0ef1637d5c89e9901b3ee65d73 Mon Sep 17 00:00:00 2001
From: Owen Jacobson <owen@grimoire.ca>
Date: Sat, 5 Oct 2024 20:12:25 -0400
Subject: Provide named operations for stored state.

---
 hi-ui/src/lib/MessageInput.svelte | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'hi-ui/src/lib/MessageInput.svelte')

diff --git a/hi-ui/src/lib/MessageInput.svelte b/hi-ui/src/lib/MessageInput.svelte
index 9a8475c..b899221 100644
--- a/hi-ui/src/lib/MessageInput.svelte
+++ b/hi-ui/src/lib/MessageInput.svelte
@@ -8,12 +8,12 @@
 
     let self;
     let input;
-    $: disabled = $activeChannel == null;
+    $: disabled = !$activeChannel.isSet();
 
     async function handleSubmit(event) {
         disabled = true;
         // TODO try/catch:
-        await postToChannel($activeChannel?.id, input);
+        await postToChannel($activeChannel.get(), input);
         input = '';
         disabled = false;
         await tick();
-- 
cgit v1.2.3

