Merge pull request #2076 from famedly/krille/do-not-load-timeline-while-sync-processing
fix: Do not load timeline while sync is processed
This commit is contained in:
commit
ecf0d6bb94
|
|
@ -1525,14 +1525,16 @@ class Room {
|
|||
}) async {
|
||||
await postLoad();
|
||||
|
||||
List<Event> events;
|
||||
var events = <Event>[];
|
||||
|
||||
if (!isArchived) {
|
||||
events = await client.database?.getEventList(
|
||||
this,
|
||||
limit: limit,
|
||||
) ??
|
||||
<Event>[];
|
||||
await client.database?.transaction(() async {
|
||||
events = await client.database?.getEventList(
|
||||
this,
|
||||
limit: limit,
|
||||
) ??
|
||||
<Event>[];
|
||||
});
|
||||
} else {
|
||||
final archive = client.getArchiveRoomFromCache(id);
|
||||
events = archive?.timeline.events.toList() ?? [];
|
||||
|
|
|
|||
Loading…
Reference in New Issue