Merge pull request #1653 from famedly/krille/do-not-miss-event-updates-timeline

refactor: Connect timeline to event updates earlier
This commit is contained in:
Krille-chan 2023-12-20 13:44:14 +01:00 committed by GitHub
commit 5d892a8007
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 8 deletions

View File

@ -1488,6 +1488,15 @@ class Room {
}
}
final timeline = Timeline(
room: this,
chunk: chunk,
onChange: onChange,
onRemove: onRemove,
onInsert: onInsert,
onNewEvent: onNewEvent,
onUpdate: onUpdate);
// Fetch all users from database we have got here.
if (eventContextId == null) {
for (final event in events) {
@ -1528,14 +1537,6 @@ class Room {
}
}
final timeline = Timeline(
room: this,
chunk: chunk,
onChange: onChange,
onRemove: onRemove,
onInsert: onInsert,
onNewEvent: onNewEvent,
onUpdate: onUpdate);
return timeline;
}