aboutsummaryrefslogtreecommitdiff
path: root/ui/room-list.go
diff options
context:
space:
mode:
authorTulir Asokan <tulir@maunium.net>2019-06-15 17:04:08 +0300
committerTulir Asokan <tulir@maunium.net>2019-06-15 17:04:08 +0300
commit160b035c4d5b88516cb4d1f4e26ec2e2e0262bcc (patch)
tree1b74381497aafe38c57aa40163735fa3fde2f1b2 /ui/room-list.go
parenta55ea42d7f5900bd5fc8fad047040c7865824f33 (diff)
Unbreak more things
Diffstat (limited to 'ui/room-list.go')
-rw-r--r--ui/room-list.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/ui/room-list.go b/ui/room-list.go
index f0a9703..53337b6 100644
--- a/ui/room-list.go
+++ b/ui/room-list.go
@@ -423,8 +423,10 @@ func (list *RoomList) OnMouseEvent(event mauview.MouseEvent) bool {
switch event.Buttons() {
case tcell.WheelUp:
list.AddScrollOffset(-WheelScrollOffsetDiff)
+ return true
case tcell.WheelDown:
list.AddScrollOffset(WheelScrollOffsetDiff)
+ return true
case tcell.Button1:
x, y := event.Position()
return list.clickRoom(y, x, event.Modifiers() == tcell.ModCtrl)
@@ -486,7 +488,8 @@ func (list *RoomList) clickRoom(line, column int, mod bool) bool {
if trl.maxShown < 10 {
trl.maxShown = 10
}
- break
+ list.RUnlock()
+ return true
}
}
// Tag footer