From 45528580ede6e516b6de60d73bd49f9f6627640e Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Mon, 3 Jun 2019 00:30:16 +0200 Subject: [PATCH] fix comparator/comparer mismatch --- src/matrix/room/timeline/entries/EventEntry.js | 4 ++-- .../timeline/entries/FragmentBoundaryEntry.js | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/matrix/room/timeline/entries/EventEntry.js b/src/matrix/room/timeline/entries/EventEntry.js index 98e961cf..ce3697fa 100644 --- a/src/matrix/room/timeline/entries/EventEntry.js +++ b/src/matrix/room/timeline/entries/EventEntry.js @@ -1,8 +1,8 @@ import BaseEntry from "./BaseEntry.js"; export default class EventEntry extends BaseEntry { - constructor(eventEntry, fragmentIdComparator) { - super(fragmentIdComparator); + constructor(eventEntry, fragmentIdComparer) { + super(fragmentIdComparer); this._eventEntry = eventEntry; } diff --git a/src/matrix/room/timeline/entries/FragmentBoundaryEntry.js b/src/matrix/room/timeline/entries/FragmentBoundaryEntry.js index 3182fd2f..5eb772f3 100644 --- a/src/matrix/room/timeline/entries/FragmentBoundaryEntry.js +++ b/src/matrix/room/timeline/entries/FragmentBoundaryEntry.js @@ -3,19 +3,19 @@ import Direction from "../Direction.js"; import {isValidFragmentId} from "../common.js"; export default class FragmentBoundaryEntry extends BaseEntry { - constructor(fragment, isFragmentStart, fragmentIdComparator) { - super(fragmentIdComparator); + constructor(fragment, isFragmentStart, fragmentIdComparer) { + super(fragmentIdComparer); this._fragment = fragment; // TODO: should isFragmentStart be Direction instead of bool? this._isFragmentStart = isFragmentStart; } - static start(fragment, fragmentIdComparator) { - return new FragmentBoundaryEntry(fragment, true, fragmentIdComparator); + static start(fragment, fragmentIdComparer) { + return new FragmentBoundaryEntry(fragment, true, fragmentIdComparer); } - static end(fragment, fragmentIdComparator) { - return new FragmentBoundaryEntry(fragment, false, fragmentIdComparator); + static end(fragment, fragmentIdComparer) { + return new FragmentBoundaryEntry(fragment, false, fragmentIdComparer); } get started() { @@ -91,10 +91,10 @@ export default class FragmentBoundaryEntry extends BaseEntry { } withUpdatedFragment(fragment) { - return new FragmentBoundaryEntry(fragment, this._isFragmentStart, this._fragmentIdComparator); + return new FragmentBoundaryEntry(fragment, this._isFragmentStart, this._fragmentIdComparer); } createNeighbourEntry(neighbour) { - return new FragmentBoundaryEntry(neighbour, !this._isFragmentStart, this._fragmentIdComparator); + return new FragmentBoundaryEntry(neighbour, !this._isFragmentStart, this._fragmentIdComparer); } }