aboutsummaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
Diffstat (limited to 'ui')
-rw-r--r--ui/room-view.go7
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).