fix autoscroll not working in certain cases

This commit is contained in:
hippoz 2022-09-01 19:21:10 +03:00
parent 884fec6c5f
commit cdb4e02413
No known key found for this signature in database
GPG key ID: 7C52899193467641

View file

@ -26,7 +26,7 @@
const onScroll = (e) => {
const { scrollTop, offsetHeight, scrollHeight } = e.target;
if ((scrollTop + offsetHeight) >= scrollHeight) { // user scrolled to bottom
if ((scrollTop + offsetHeight) >= (scrollHeight - 10)) { // user scrolled to bottom
messages.setIsCollectingOldMessages(true);
shouldAutoscroll = true;
isScrolledToBottom = true;