diff --git a/plugins/chunter-resources/src/components/Channel.svelte b/plugins/chunter-resources/src/components/Channel.svelte index b6555074ac..8820054676 100644 --- a/plugins/chunter-resources/src/components/Channel.svelte +++ b/plugins/chunter-resources/src/components/Channel.svelte @@ -71,7 +71,7 @@ // For now loading all messages for documents with activity. Need to correct handle aggregation with pagination. // Perhaps we should load all activity messages once, and keep loading in chunks only for ChatMessages then merge them correctly with activity messages const loadAll = isDocChannel - dataProvider = new ChannelDataProvider(attachedTo, _class, lastViewedTimestamp, selectedMessageId, loadAll) + dataProvider = new ChannelDataProvider(attachedTo, _class, lastViewedTimestamp ?? 0, selectedMessageId, loadAll) } } diff --git a/plugins/chunter-resources/src/components/ChannelScrollView.svelte b/plugins/chunter-resources/src/components/ChannelScrollView.svelte index 5763ea9adf..8e4b92eaac 100644 --- a/plugins/chunter-resources/src/components/ChannelScrollView.svelte +++ b/plugins/chunter-resources/src/components/ChannelScrollView.svelte @@ -425,9 +425,9 @@ autoscroll = false }) } else if (separatorElement) { - isScrollInitialized = true await wait() scrollToSeparator() + isScrollInitialized = true isInitialScrolling = false } } @@ -554,7 +554,7 @@ beforeUpdate(() => { if (!scrollElement) return - if (scrollElement.scrollHeight === scrollElement.clientHeight) { + if (isScrollInitialized && scrollElement.scrollHeight === scrollElement.clientHeight) { isScrollAtBottom = true } })