Skip to content

Commit

Permalink
ScrollFinisher: reset targetPos after reaching the target
Browse files Browse the repository at this point in the history
Otherwise the old targetPos stands in the way of correct scrolling if
the read marker is out of the viewport in the next room the user
switched to.
  • Loading branch information
KitsuneRal committed Oct 2, 2023
1 parent 8ccd49a commit 44d0acb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion client/qml/ScrollFinisher.qml
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,9 @@ Timer {
// repeat positioning; otherwise, position the canvas exactly
// where it should be
if (targetPos) {
// this.contentY is readonly
// NB: this.contentY is a readonly alias
parent.contentY = targetPos
targetPos = undefined
return true
}
parent.positionViewAtIndex(targetIndex, positionMode)
Expand Down

0 comments on commit 44d0acb

Please sign in to comment.