Fix room ordering after initial sync (ref #36)

This commit is contained in:
Tulir Asokan
2018-05-15 18:45:09 +03:00
parent fdbb168e2b
commit cb3a6e764e
3 changed files with 11 additions and 1 deletions

View File

@ -470,10 +470,16 @@ func (view *MainView) NotifyMessage(room *rooms.Room, message ifc.Message, shoul
}
message.SetIsHighlight(should.Highlight)
room.LastReceivedMessage = message.Timestamp()
view.roomList.Bump(room)
}
func (view *MainView) InitialSyncDone() {
view.roomList.Clear()
for _, room := range view.rooms {
view.roomList.Add(room.Room)
}
}
func (view *MainView) LoadHistory(room string) {
defer debug.Recover()
roomView := view.rooms[room]