Update +layout.svelte

This commit is contained in:
Aidan Bleser 2025-06-17 11:25:13 -05:00
parent 967561391e
commit be56c88f55

View file

@ -23,7 +23,7 @@
import { Popover } from 'melt/builders'; import { Popover } from 'melt/builders';
import { useConvexClient } from 'convex-svelte'; import { useConvexClient } from 'convex-svelte';
import { callModal } from '$lib/components/ui/modal/global-modal.svelte'; import { callModal } from '$lib/components/ui/modal/global-modal.svelte';
import { ElementSize, ScrollState, Debounced } from 'runed'; import { ElementSize, ScrollState, Debounced, IsMounted } from 'runed';
import LoaderCircleIcon from '~icons/lucide/loader-circle'; import LoaderCircleIcon from '~icons/lucide/loader-circle';
import { cn } from '$lib/utils/utils.js'; import { cn } from '$lib/utils/utils.js';
import { pick } from '$lib/utils/object.js'; import { pick } from '$lib/utils/object.js';
@ -274,7 +274,12 @@
element: () => conversationList, element: () => conversationList,
}); });
const notAtBottom = new Debounced(() => !scrollState.arrived.bottom, 500); const mounted = new IsMounted();
const notAtBottom = new Debounced(
() => !scrollState.arrived.bottom,
() => (mounted.current ? 500 : 0)
);
</script> </script>
<svelte:head> <svelte:head>