Somewhat hackily force focus to room view. Fixes #95

This commit is contained in:
Tulir Asokan 2019-06-16 16:52:19 +03:00
parent 859fd6092b
commit eb2726e8df

View File

@ -270,6 +270,9 @@ func (view *MainView) switchRoom(tag string, room *rooms.Room, lock bool) {
view.currentRoom = roomView view.currentRoom = roomView
view.MarkRead(roomView) view.MarkRead(roomView)
view.roomList.SetSelected(tag, room) view.roomList.SetSelected(tag, room)
view.flex.SetFocused(view.roomView)
view.focused = view.roomView
view.roomView.Focus()
view.parent.Render() view.parent.Render()
if msgView := roomView.MessageView(); len(msgView.messages) < 20 && !msgView.initialHistoryLoaded { if msgView := roomView.MessageView(); len(msgView.messages) < 20 && !msgView.initialHistoryLoaded {