diff options
author | Tulir Asokan <tulir@maunium.net> | 2018-04-23 23:22:18 +0300 |
---|---|---|
committer | Tulir Asokan <tulir@maunium.net> | 2018-04-24 02:13:43 +0300 |
commit | 135fcbf284e941a312567d22af80fe69d49cbd89 (patch) | |
tree | 2ebbed34c82f73d88d5041de7a16de68b4d524d5 /ui/view-main.go | |
parent | 1e8705319a2bc6461d8768273aac16df4b6df4be (diff) |
Make time-based room list sorting persistent (ref #11)
Diffstat (limited to 'ui/view-main.go')
-rw-r--r-- | ui/view-main.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ui/view-main.go b/ui/view-main.go index e9350e7..d1af09d 100644 --- a/ui/view-main.go +++ b/ui/view-main.go @@ -249,6 +249,10 @@ func (view *MainView) MouseEventHandler(roomView *RoomView, event *tcell.EventMo } func (view *MainView) SwitchRoom(room *rooms.Room) { + if room == nil { + return + } + view.roomView.SwitchToPage(room.ID) roomView := view.rooms[room.ID] if roomView.MessageView().ScrollOffset == 0 { |