Merge branch 'room-fix-storeless-timeline' into 'master'
[Room] Fix storeless timeline See merge request famedly/famedlysdk!167
This commit is contained in:
commit
bc2ca9749c
|
@ -729,19 +729,19 @@ class Room {
|
|||
Future<Timeline> getTimeline(
|
||||
{onTimelineUpdateCallback onUpdate,
|
||||
onTimelineInsertCallback onInsert}) async {
|
||||
List<Event> events = [];
|
||||
if (client.store != null) {
|
||||
events = await client.store.getEventList(this);
|
||||
} else {
|
||||
prev_batch = "";
|
||||
await requestHistory();
|
||||
}
|
||||
return Timeline(
|
||||
List<Event> events =
|
||||
client.store != null ? await client.store.getEventList(this) : [];
|
||||
Timeline timeline = Timeline(
|
||||
room: this,
|
||||
events: events,
|
||||
onUpdate: onUpdate,
|
||||
onInsert: onInsert,
|
||||
);
|
||||
if (client.store == null) {
|
||||
prev_batch = "";
|
||||
await requestHistory();
|
||||
}
|
||||
return timeline;
|
||||
}
|
||||
|
||||
/// Load all participants for a given room from the store.
|
||||
|
|
Loading…
Reference in a new issue