summaryrefslogtreecommitdiff
path: root/ui/routes/(app)/ch
diff options
context:
space:
mode:
authorOwen Jacobson <owen@grimoire.ca>2025-02-21 17:07:35 -0500
committerOwen Jacobson <owen@grimoire.ca>2025-02-21 17:07:35 -0500
commit25daf36b18086096651b381223ad8f03fbca5045 (patch)
tree41f5efc395852b0bcf4cc79130113e26bd4bb72a /ui/routes/(app)/ch
parent75aa3b41cbf1c41ce08f307a12a1f101cb357f29 (diff)
Retire use of $page store in favour of Sv5 page state
Diffstat (limited to 'ui/routes/(app)/ch')
-rw-r--r--ui/routes/(app)/ch/[channel]/+page.svelte5
1 files changed, 3 insertions, 2 deletions
diff --git a/ui/routes/(app)/ch/[channel]/+page.svelte b/ui/routes/(app)/ch/[channel]/+page.svelte
index 9335198..84cb0ae 100644
--- a/ui/routes/(app)/ch/[channel]/+page.svelte
+++ b/ui/routes/(app)/ch/[channel]/+page.svelte
@@ -1,11 +1,11 @@
<script>
import { DateTime } from 'luxon';
- import { page } from '$app/stores';
+ import { page } from '$app/state';
import ActiveChannel from '$lib/components/ActiveChannel.svelte';
import MessageInput from '$lib/components/MessageInput.svelte';
import { channelsList, messages } from '$lib/store';
- let channel = $derived($page.params.channel);
+ let channel = $derived(page.params.channel);
let messageRuns = $derived($messages.inChannel(channel));
let activeChannel;
@@ -58,6 +58,7 @@
}
let lastReadCallback = null;
+
function onscroll() {
clearTimeout(lastReadCallback); // Fine if lastReadCallback is null still.
lastReadCallback = setTimeout(setLastRead, 2 * 1000);