ai: simplify auto scroll (#2080)

This commit is contained in:
end-4
2025-09-30 07:58:54 +02:00
parent 0b36e2a833
commit 27626ee59a
@@ -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