You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-11-29 16:43:09 +03:00
Appease the linter
This commit is contained in:
committed by
Bruno Windels
parent
8a56a5f1ed
commit
a54845bf76
@@ -409,14 +409,18 @@ EventTimelineSet.prototype.addEventsToTimeline = function(events, toStartOfTimel
|
|||||||
" - joining timeline " + timeline + " to " +
|
" - joining timeline " + timeline + " to " +
|
||||||
existingTimeline);
|
existingTimeline);
|
||||||
|
|
||||||
if (direction === EventTimeline.BACKWARDS && existingTimeline === this._liveTimeline) {
|
// Variables to keep the line length limited below.
|
||||||
|
const existingIsLive = existingTimeline === this._liveTimeline;
|
||||||
|
const timelineIsLive = timeline === this._liveTimeline;
|
||||||
|
|
||||||
|
if (direction === EventTimeline.BACKWARDS && existingIsLive) {
|
||||||
// The live timeline should never be spliced into a non-live position.
|
// The live timeline should never be spliced into a non-live position.
|
||||||
console.warn("Refusing to splice live timeline as a backwards timeline");
|
console.warn("Refusing to splice live timeline as a backwards timeline");
|
||||||
} else {
|
} else {
|
||||||
timeline.setNeighbouringTimeline(existingTimeline, direction);
|
timeline.setNeighbouringTimeline(existingTimeline, direction);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (inverseDirection === EventTimeline.BACKWARDS && timeline === this._liveTimeline) {
|
if (inverseDirection === EventTimeline.BACKWARDS && timelineIsLive) {
|
||||||
// The live timeline should never be spliced into a non-live position.
|
// The live timeline should never be spliced into a non-live position.
|
||||||
console.warn("Refusing to splice live timeline as a forwards timeline");
|
console.warn("Refusing to splice live timeline as a forwards timeline");
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user