diff options
author | Tulir Asokan <tulir@maunium.net> | 2018-04-24 22:46:16 +0300 |
---|---|---|
committer | Tulir Asokan <tulir@maunium.net> | 2018-04-24 22:46:16 +0300 |
commit | 6aceb4f8d2061fb99fd16deda58f4807d81a6ff7 (patch) | |
tree | 2d2b33d4930fe3072ef7db9b8af10bbfcbc4643e /ui/view-main.go | |
parent | 9ccceb48b98a999eb31de113bd0b994844ce7dc3 (diff) |
Fix First(), Last(), Next() and Previous() of RoomList
Diffstat (limited to 'ui/view-main.go')
-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 f3fb210..d20fed3 100644 --- a/ui/view-main.go +++ b/ui/view-main.go @@ -319,6 +319,9 @@ func (view *MainView) AddRoom(roomID string) { room := view.matrix.GetRoom(roomID) view.roomList.Add(room) view.addRoomPage(room) + if !view.roomList.HasSelected() { + view.SwitchRoom(view.roomList.First()) + } } func (view *MainView) RemoveRoom(roomID string) { |