mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-16 13:14:58 +08:00
Merge pull request #4812 from matrix-org/travis/room-list/previews
Use the correct timeline reference for message previews
This commit is contained in:
commit
d61d243284
@ -78,9 +78,8 @@ export class MessagePreviewStore extends AsyncStoreWithClient<IState> {
|
||||
}
|
||||
|
||||
private generatePreview(room: Room) {
|
||||
const timeline = room.getLiveTimeline();
|
||||
if (!timeline) return; // usually only happens in tests
|
||||
const events = timeline.getEvents();
|
||||
const events = room.timeline;
|
||||
if (!events) return; // should only happen in tests
|
||||
|
||||
for (let i = events.length - 1; i >= 0; i--) {
|
||||
if (i === events.length - MAX_EVENTS_BACKWARDS) return; // limit reached
|
||||
|
Loading…
Reference in New Issue
Block a user