Merge branch 'room-fix-requesthistory-in-gettimeline' into 'master'

[Room] Request history in getTimeline

See merge request famedly/famedlysdk!77
This commit is contained in:
Marcel 2019-09-10 12:48:00 +00:00
commit 544e153c24

View file

@ -596,7 +596,12 @@ class Room {
{onTimelineUpdateCallback onUpdate, {onTimelineUpdateCallback onUpdate,
onTimelineInsertCallback onInsert}) async { onTimelineInsertCallback onInsert}) async {
List<Event> events = []; List<Event> events = [];
if (client.store != null) events = await client.store.getEventList(this); if (client.store != null)
events = await client.store.getEventList(this);
else {
prev_batch = "";
requestHistory();
}
return Timeline( return Timeline(
room: this, room: this,
events: events, events: events,