Don't jump calendar around for events which appear in the future (#196)
Don't jump calendar around for events which appear in the future compared to the timestamp in the URL. This sort of situation occurs often for Gitter imported historical rooms where we have a bunch of history that is timestamp massaged intermixed with a bunch of join events which we couldn't timestamp massage at the time. Fix https://github.com/matrix-org/matrix-public-archive/issues/182
This commit is contained in:
parent
53a1d4b43b
commit
addb02198d
|
@ -185,7 +185,11 @@ class ArchiveRoomView extends TemplateView {
|
|||
if (entry.isIntersecting) {
|
||||
const eventId = entry.target.getAttribute('data-event-id');
|
||||
const eventEntry = vm.eventEntriesByEventId[eventId];
|
||||
vm.setCurrentTopPositionEventEntry(eventEntry);
|
||||
|
||||
// Ignore events which appear in the future
|
||||
if (eventEntry.timestamp <= vm.dayTimestampTo) {
|
||||
vm.setCurrentTopPositionEventEntry(eventEntry);
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue