1
0
Fork 0
forked from Mirrors/gomuks

Keep selected room on screen when scrolling

This commit is contained in:
FIGBERT 2023-04-18 23:07:09 -07:00
parent 04ceba153f
commit 81018c2da7
No known key found for this signature in database
GPG key ID: 67F1598D607A844B

View file

@ -148,7 +148,7 @@ func (rstr *RosterView) ScrollNext() {
rstr.Lock()
defer rstr.Unlock()
rstr.selected = rstr.rooms[index+1]
if rstr.VisualScrollHeight(rstr.scrollOffset, index+1) >= rstr.height {
if rstr.VisualScrollHeight(rstr.scrollOffset, index+2) >= rstr.height {
rstr.scrollOffset++
}
}