summaryrefslogtreecommitdiff
path: root/ui/routes/(app)
diff options
context:
space:
mode:
Diffstat (limited to 'ui/routes/(app)')
-rw-r--r--ui/routes/(app)/+layout.svelte4
-rw-r--r--ui/routes/(app)/ch/[channel]/+page.svelte5
2 files changed, 5 insertions, 4 deletions
diff --git a/ui/routes/(app)/+layout.svelte b/ui/routes/(app)/+layout.svelte
index a81efce..6339abd 100644
--- a/ui/routes/(app)/+layout.svelte
+++ b/ui/routes/(app)/+layout.svelte
@@ -1,5 +1,5 @@
<script>
- import { page } from '$app/stores';
+ import { page } from '$app/state';
import { goto } from '$app/navigation';
import { browser } from '$app/environment';
import { getContext, onDestroy, onMount } from 'svelte';
@@ -17,7 +17,7 @@
let pageContext = getContext('page');
let { children } = $props();
let loading = $state(true);
- let channel = $derived($page.params.channel);
+ let channel = $derived(page.params.channel);
let rawChannels = $derived($channelsList.channels);
let rawMessages = $derived($messages);
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);