mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-17 05:47:32 +00:00
Fix scroll to new messages (#5782)
Signed-off-by: Kristina Fefelova <kristin.fefelova@gmail.com>
This commit is contained in:
parent
9585a1106f
commit
8e440b8f0f
plugins/chunter-resources/src/components
@ -71,7 +71,7 @@
|
|||||||
// For now loading all messages for documents with activity. Need to correct handle aggregation with pagination.
|
// 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
|
// 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
|
const loadAll = isDocChannel
|
||||||
dataProvider = new ChannelDataProvider(attachedTo, _class, lastViewedTimestamp, selectedMessageId, loadAll)
|
dataProvider = new ChannelDataProvider(attachedTo, _class, lastViewedTimestamp ?? 0, selectedMessageId, loadAll)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -425,9 +425,9 @@
|
|||||||
autoscroll = false
|
autoscroll = false
|
||||||
})
|
})
|
||||||
} else if (separatorElement) {
|
} else if (separatorElement) {
|
||||||
isScrollInitialized = true
|
|
||||||
await wait()
|
await wait()
|
||||||
scrollToSeparator()
|
scrollToSeparator()
|
||||||
|
isScrollInitialized = true
|
||||||
isInitialScrolling = false
|
isInitialScrolling = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -554,7 +554,7 @@
|
|||||||
beforeUpdate(() => {
|
beforeUpdate(() => {
|
||||||
if (!scrollElement) return
|
if (!scrollElement) return
|
||||||
|
|
||||||
if (scrollElement.scrollHeight === scrollElement.clientHeight) {
|
if (isScrollInitialized && scrollElement.scrollHeight === scrollElement.clientHeight) {
|
||||||
isScrollAtBottom = true
|
isScrollAtBottom = true
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user