- Introduced new state variables to manage auto-scrolling functionality. - Implemented a method to calculate the distance from the bottom of the chat. - Improved the logic for auto-scrolling to the bottom when new messages arrive or when the user is near the bottom. - Refactored the scroll-to-bottom logic to enhance performance and user experience. - Ensured that the auto-scroll behavior is only triggered when appropriate, preventing unnecessary scrolls.
110 KiB
110 KiB