Merge pull request #1382 from Armored-Dragon/fix/ac_scrolling-distance_check
Some checks are pending
Master API-docs CI Build and Deploy / Build and deploy API-docs (push) Waiting to run
Master Doxygen CI Build and Deploy / Build and deploy Doxygen documentation (push) Waiting to run

Fix Armored Chat always scrolling on a new message
This commit is contained in:
ksuprynowicz 2025-04-06 18:59:12 +02:00 committed by GitHub
commit e0bdffd470
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -21,6 +21,7 @@ Rectangle {
repeat: false
onTriggered: {
toScript({type: "initialized"});
load_scroll_timer.bypassDistanceCheck = true
load_scroll_timer.running = true
}
}
@ -29,8 +30,12 @@ Rectangle {
interval: 100
running: false
repeat: false
property bool bypassDistanceCheck: false // One time event. Whether we should bypass the distance check, and scroll to the bottom regardless or not.
onTriggered: {
scrollToBottom(true);
scrollToBottom(bypassDistanceCheck);
bypassDistanceCheck = false; // Set the property to false, this was a one time event!
}
}
@ -73,6 +78,7 @@ Rectangle {
anchors.fill: parent
onClicked: {
pageVal = "local";
load_scroll_timer.bypassDistanceCheck = true;
load_scroll_timer.running = true;
}
}
@ -101,7 +107,8 @@ Rectangle {
MouseArea {
anchors.fill: parent
onClicked: {
pageVal = "domain"
pageVal = "domain";
load_scroll_timer.bypassDistanceCheck = true;
load_scroll_timer.running = true;
}
}