mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 03:25:12 +01:00
Rename tileCreator -> tilesCreator
This commit is contained in:
parent
d639e169ec
commit
51215fda16
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user