mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 03:25:12 +01:00
fix comparator/comparer mismatch
This commit is contained in:
parent
3dbf5e727d
commit
45528580ed
@ -1,8 +1,8 @@
|
|||||||
import BaseEntry from "./BaseEntry.js";
|
import BaseEntry from "./BaseEntry.js";
|
||||||
|
|
||||||
export default class EventEntry extends BaseEntry {
|
export default class EventEntry extends BaseEntry {
|
||||||
constructor(eventEntry, fragmentIdComparator) {
|
constructor(eventEntry, fragmentIdComparer) {
|
||||||
super(fragmentIdComparator);
|
super(fragmentIdComparer);
|
||||||
this._eventEntry = eventEntry;
|
this._eventEntry = eventEntry;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,19 +3,19 @@ import Direction from "../Direction.js";
|
|||||||
import {isValidFragmentId} from "../common.js";
|
import {isValidFragmentId} from "../common.js";
|
||||||
|
|
||||||
export default class FragmentBoundaryEntry extends BaseEntry {
|
export default class FragmentBoundaryEntry extends BaseEntry {
|
||||||
constructor(fragment, isFragmentStart, fragmentIdComparator) {
|
constructor(fragment, isFragmentStart, fragmentIdComparer) {
|
||||||
super(fragmentIdComparator);
|
super(fragmentIdComparer);
|
||||||
this._fragment = fragment;
|
this._fragment = fragment;
|
||||||
// TODO: should isFragmentStart be Direction instead of bool?
|
// TODO: should isFragmentStart be Direction instead of bool?
|
||||||
this._isFragmentStart = isFragmentStart;
|
this._isFragmentStart = isFragmentStart;
|
||||||
}
|
}
|
||||||
|
|
||||||
static start(fragment, fragmentIdComparator) {
|
static start(fragment, fragmentIdComparer) {
|
||||||
return new FragmentBoundaryEntry(fragment, true, fragmentIdComparator);
|
return new FragmentBoundaryEntry(fragment, true, fragmentIdComparer);
|
||||||
}
|
}
|
||||||
|
|
||||||
static end(fragment, fragmentIdComparator) {
|
static end(fragment, fragmentIdComparer) {
|
||||||
return new FragmentBoundaryEntry(fragment, false, fragmentIdComparator);
|
return new FragmentBoundaryEntry(fragment, false, fragmentIdComparer);
|
||||||
}
|
}
|
||||||
|
|
||||||
get started() {
|
get started() {
|
||||||
@ -91,10 +91,10 @@ export default class FragmentBoundaryEntry extends BaseEntry {
|
|||||||
}
|
}
|
||||||
|
|
||||||
withUpdatedFragment(fragment) {
|
withUpdatedFragment(fragment) {
|
||||||
return new FragmentBoundaryEntry(fragment, this._isFragmentStart, this._fragmentIdComparator);
|
return new FragmentBoundaryEntry(fragment, this._isFragmentStart, this._fragmentIdComparer);
|
||||||
}
|
}
|
||||||
|
|
||||||
createNeighbourEntry(neighbour) {
|
createNeighbourEntry(neighbour) {
|
||||||
return new FragmentBoundaryEntry(neighbour, !this._isFragmentStart, this._fragmentIdComparator);
|
return new FragmentBoundaryEntry(neighbour, !this._isFragmentStart, this._fragmentIdComparer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user