diff options
author | Tulir Asokan <tulir@maunium.net> | 2019-06-16 16:52:19 +0300 |
---|---|---|
committer | Tulir Asokan <tulir@maunium.net> | 2019-06-16 16:52:19 +0300 |
commit | eb2726e8df30bc8d62ec36eb99955276cd24b0e4 (patch) | |
tree | 9ac49868ba71d046a70243f422589b659d214892 /ui | |
parent | 859fd6092b6141363cef1cb58c2608f524314dc2 (diff) |
Somewhat hackily force focus to room view. Fixes #95
Diffstat (limited to 'ui')
-rw-r--r-- | ui/view-main.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ui/view-main.go b/ui/view-main.go index ea24644..2a8a1fe 100644 --- a/ui/view-main.go +++ b/ui/view-main.go @@ -270,6 +270,9 @@ func (view *MainView) switchRoom(tag string, room *rooms.Room, lock bool) { view.currentRoom = roomView view.MarkRead(roomView) view.roomList.SetSelected(tag, room) + view.flex.SetFocused(view.roomView) + view.focused = view.roomView + view.roomView.Focus() view.parent.Render() if msgView := roomView.MessageView(); len(msgView.messages) < 20 && !msgView.initialHistoryLoaded { |