Adjust scroll position handling when chat window height changes, fixes #418

This commit is contained in:
Sebastian Wolf 2021-05-25 23:15:43 +02:00
parent 388ea83e45
commit b350487fb9
No known key found for this signature in database
GPG key ID: CEA9522B5F38A90A

View file

@ -1050,8 +1050,13 @@ Page {
} }
onHeightChanged: { onHeightChanged: {
var deltaHeight = previousHeight - height; console.log("Height changed, previous: " + previousHeight + ", now: " + height);
chatView.contentY = chatView.contentY + deltaHeight; if (previousHeight > height) {
var deltaHeight = previousHeight - height;
chatView.contentY = chatView.contentY + deltaHeight;
} else {
chatView.handleScrollPositionChanged();
}
previousHeight = height; previousHeight = height;
} }