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/Channel.svelte | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

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

diff --git a/hi-ui/src/lib/Channel.svelte b/hi-ui/src/lib/Channel.svelte
index 7826c46..ad07594 100644
--- a/hi-ui/src/lib/Channel.svelte
+++ b/hi-ui/src/lib/Channel.svelte
@@ -6,11 +6,11 @@
     let active = false;
 
     activeChannel.subscribe((value) => {
-        active = value ? value.id == id : false;
+        active = value.is(id);
     });
 
     function activate() {
-        activeChannel.update(() => ({ id, name }));
+        activeChannel.update((value) => value.set(id));
     }
 </script>
 
-- 
cgit v1.2.3

