diff options
author | Tulir Asokan <tulir@maunium.net> | 2019-06-15 18:03:28 +0300 |
---|---|---|
committer | Tulir Asokan <tulir@maunium.net> | 2019-06-15 18:03:28 +0300 |
commit | ef509eb3082e4017284345b195ce0489c90a993d (patch) | |
tree | 1c2f6d8431fc62999971cab5b105075fd2c84227 /ui | |
parent | 0f08c49df40f77e90e4b5ef7604c74631065faa3 (diff) |
Fix infinite recursion
Diffstat (limited to 'ui')
-rw-r--r-- | ui/room-view.go | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/ui/room-view.go b/ui/room-view.go index 48943a7..00aa09a 100644 --- a/ui/room-view.go +++ b/ui/room-view.go @@ -93,17 +93,14 @@ func NewRoomView(parent *MainView, room *rooms.Room) *RoomView { config: parent.config, } view.content = NewMessageView(view) - view.Room.SetOnUnload(func() bool { + view.Room.SetPreUnload(func() bool { if view.parent.currentRoom == view { return false } view.content.Unload() return true }) - view.Room.SetOnLoad(func() bool { - view.loadTyping() - return true - }) + view.Room.SetPostLoad(view.loadTyping) view.input. SetBackgroundColor(tcell.ColorDefault). |