From 2f6adda366dc372609f214682ca866c104fc278e Mon Sep 17 00:00:00 2001
From: Kit La Touche <kit@transneptune.net>
Date: Thu, 21 Nov 2024 16:26:10 -0500
Subject: Use store.set where appropriate

If you're setting it to a static value, use set.
---
 ui/routes/(app)/+layout.svelte | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

(limited to 'ui/routes/(app)/+layout.svelte')

diff --git a/ui/routes/(app)/+layout.svelte b/ui/routes/(app)/+layout.svelte
index cc900a6..e542f24 100644
--- a/ui/routes/(app)/+layout.svelte
+++ b/ui/routes/(app)/+layout.svelte
@@ -20,10 +20,10 @@
   let channel = $derived($page.params.channel);
 
   function onBooted(boot) {
-    currentUser.update(() => ({
+    currentUser.set({
       id: boot.login.id,
       username: boot.login.name
-    }));
+    });
     logins.update((value) => value.setLogins(boot.logins));
     channelsList.update((value) => value.setChannels(boot.channels));
     messages.update((value) => value.setMessages(boot.messages));
@@ -51,11 +51,11 @@
         events = subscribeToEvents(response.data.resume_point);
         break;
       case 401:
-        currentUser.update(() => null);
+        currentUser.set(null);
         goto('/login');
         break;
       case 503:
-        currentUser.update(() => null);
+        currentUser.set(null);
         goto('/setup');
         break;
       default:
-- 
cgit v1.2.3

