From 27626ee59aeb561fe56c557968147384f5ce853f Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Tue, 30 Sep 2025 07:58:54 +0200 Subject: [PATCH] ai: simplify auto scroll (#2080) --- .config/quickshell/ii/modules/sidebarLeft/AiChat.qml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.config/quickshell/ii/modules/sidebarLeft/AiChat.qml b/.config/quickshell/ii/modules/sidebarLeft/AiChat.qml index 16d7baee8..814077787 100644 --- a/.config/quickshell/ii/modules/sidebarLeft/AiChat.qml +++ b/.config/quickshell/ii/modules/sidebarLeft/AiChat.qml @@ -335,14 +335,11 @@ Inline w/ backslash and round brackets \\(e^{i\\pi} + 1 = 0\\) mouseScrollFactor: Config.options.interactions.scrolling.mouseScrollFactor * 1.4 property int lastResponseLength: 0 - property bool shouldAutoScroll: true - - onContentYChanged: shouldAutoScroll = atYEnd onContentHeightChanged: { - if (shouldAutoScroll) positionViewAtEnd(); + if (atYEnd) positionViewAtEnd(); } onCountChanged: { // Auto-scroll when new messages are added - if (shouldAutoScroll) positionViewAtEnd(); + if (atYEnd) positionViewAtEnd(); } add: null // Prevent function calls from being janky