Redraw UI when starting to load more messages
This commit is contained in:
parent
852023c611
commit
98dd1bcdc9
@ -442,11 +442,14 @@ func (view *MainView) LoadHistory(roomID string) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
defer atomic.StoreInt32(&msgView.loadingMessages, 0)
|
defer atomic.StoreInt32(&msgView.loadingMessages, 0)
|
||||||
|
// Update the "Loading more messages..." text
|
||||||
|
view.parent.Render()
|
||||||
|
|
||||||
history, err := view.matrix.GetHistory(roomView.Room, 50)
|
history, err := view.matrix.GetHistory(roomView.Room, 50)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
roomView.AddServiceMessage("Failed to fetch history")
|
roomView.AddServiceMessage("Failed to fetch history")
|
||||||
debug.Print("Failed to fetch history for", roomView.Room.ID, err)
|
debug.Print("Failed to fetch history for", roomView.Room.ID, err)
|
||||||
|
view.parent.Render()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
for _, evt := range history {
|
for _, evt := range history {
|
||||||
|
Loading…
Reference in New Issue
Block a user