forked from Mirrors/gomuks
Keep selected room on screen when scrolling
This commit is contained in:
parent
04ceba153f
commit
81018c2da7
1 changed files with 1 additions and 1 deletions
|
@ -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++
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue