forked from Shinonome/dots-hyprland
ai: simplify auto scroll (#2080)
This commit is contained in:
@@ -335,14 +335,11 @@ Inline w/ backslash and round brackets \\(e^{i\\pi} + 1 = 0\\)
|
|||||||
mouseScrollFactor: Config.options.interactions.scrolling.mouseScrollFactor * 1.4
|
mouseScrollFactor: Config.options.interactions.scrolling.mouseScrollFactor * 1.4
|
||||||
|
|
||||||
property int lastResponseLength: 0
|
property int lastResponseLength: 0
|
||||||
property bool shouldAutoScroll: true
|
|
||||||
|
|
||||||
onContentYChanged: shouldAutoScroll = atYEnd
|
|
||||||
onContentHeightChanged: {
|
onContentHeightChanged: {
|
||||||
if (shouldAutoScroll) positionViewAtEnd();
|
if (atYEnd) positionViewAtEnd();
|
||||||
}
|
}
|
||||||
onCountChanged: { // Auto-scroll when new messages are added
|
onCountChanged: { // Auto-scroll when new messages are added
|
||||||
if (shouldAutoScroll) positionViewAtEnd();
|
if (atYEnd) positionViewAtEnd();
|
||||||
}
|
}
|
||||||
|
|
||||||
add: null // Prevent function calls from being janky
|
add: null // Prevent function calls from being janky
|
||||||
|
|||||||
Reference in New Issue
Block a user