Rename tileCreator -> tilesCreator
This commit is contained in:
parent
d639e169ec
commit
51215fda16
2 changed files with 4 additions and 4 deletions
|
@ -21,7 +21,7 @@ import {getIdentifierColorNumber, avatarInitials, getAvatarHttpUrl} from "../../
|
|||
export class BaseMessageTile extends SimpleTile {
|
||||
constructor(options) {
|
||||
super(options);
|
||||
this._tileCreator = options.tileCreator;
|
||||
this._tilesCreator = options.tilesCreator;
|
||||
this._date = this._entry.timestamp ? new Date(this._entry.timestamp) : null;
|
||||
this._isContinuation = false;
|
||||
this._reactions = null;
|
||||
|
@ -123,7 +123,7 @@ export class BaseMessageTile extends SimpleTile {
|
|||
const action = this._replyTile.updateEntry(replyEntry);
|
||||
if (action?.shouldReplace) {
|
||||
this.disposeTracked(this._replyTile);
|
||||
this._replyTile = this._tileCreator(replyEntry);
|
||||
this._replyTile = this._tilesCreator(replyEntry);
|
||||
}
|
||||
if(action?.shouldUpdate) {
|
||||
this._replyTile.emitChange();
|
||||
|
@ -236,7 +236,7 @@ export class BaseMessageTile extends SimpleTile {
|
|||
if (!this._replyTile) {
|
||||
const entry = this._entry.contextEntry;
|
||||
if (entry) {
|
||||
this._replyTile = this.track(this._tileCreator(entry));
|
||||
this._replyTile = this.track(this._tilesCreator(entry));
|
||||
}
|
||||
}
|
||||
return this._replyTile;
|
||||
|
|
|
@ -29,7 +29,7 @@ import {MissingAttachmentTile} from "./tiles/MissingAttachmentTile.js";
|
|||
|
||||
export function tilesCreator(baseOptions) {
|
||||
const creator = function tilesCreator(entry, emitUpdate) {
|
||||
const options = Object.assign({entry, emitUpdate, tileCreator: creator}, baseOptions);
|
||||
const options = Object.assign({entry, emitUpdate, tilesCreator: creator}, baseOptions);
|
||||
if (entry.isGap) {
|
||||
return new GapTile(options);
|
||||
} else if (entry.isPending && entry.pendingEvent.isMissingAttachments) {
|
||||
|
|
Reference in a new issue