diff --git a/src/domain/session/room/timeline/ReactionsViewModel.js b/src/domain/session/room/timeline/ReactionsViewModel.js index de5ea2c3..a7c175b1 100644 --- a/src/domain/session/room/timeline/ReactionsViewModel.js +++ b/src/domain/session/room/timeline/ReactionsViewModel.js @@ -225,7 +225,7 @@ export function tests() { return new BaseMessageTile({entry, roomVM: {room}, timeline, platform: {logger}}); } return null; - }, (tile, params, entry) => tile?.updateEntry(entry, params)); + }, (tile, params, entry) => tile?.updateEntry(entry, params, null)); return tiles; } diff --git a/src/domain/session/room/timeline/tiles/BaseMessageTile.js b/src/domain/session/room/timeline/tiles/BaseMessageTile.js index 65b50269..091ef518 100644 --- a/src/domain/session/room/timeline/tiles/BaseMessageTile.js +++ b/src/domain/session/room/timeline/tiles/BaseMessageTile.js @@ -128,7 +128,7 @@ export class BaseMessageTile extends SimpleTile { this._replyTile?.emitChange(); } } - const action = super.updateEntry(entry, param); + const action = super.updateEntry(entry, param, tilesCreator); if (action.shouldUpdate) { this._updateReactions(); } diff --git a/src/domain/session/room/timeline/tiles/EncryptedEventTile.js b/src/domain/session/room/timeline/tiles/EncryptedEventTile.js index b96e2d85..50f507eb 100644 --- a/src/domain/session/room/timeline/tiles/EncryptedEventTile.js +++ b/src/domain/session/room/timeline/tiles/EncryptedEventTile.js @@ -18,8 +18,8 @@ import {BaseTextTile} from "./BaseTextTile.js"; import {UpdateAction} from "../UpdateAction.js"; export class EncryptedEventTile extends BaseTextTile { - updateEntry(entry, params) { - const parentResult = super.updateEntry(entry, params); + updateEntry(entry, params, tilesCreator) { + const parentResult = super.updateEntry(entry, params, tilesCreator); // event got decrypted, recreate the tile and replace this one with it if (entry.eventType !== "m.room.encrypted") { // the "shape" parameter trigger tile recreation in TimelineView diff --git a/src/domain/session/room/timeline/tiles/GapTile.js b/src/domain/session/room/timeline/tiles/GapTile.js index c1fed69f..df0cedd9 100644 --- a/src/domain/session/room/timeline/tiles/GapTile.js +++ b/src/domain/session/room/timeline/tiles/GapTile.js @@ -81,8 +81,8 @@ export class GapTile extends SimpleTile { this._siblingChanged = true; } - updateEntry(entry, params) { - super.updateEntry(entry, params); + updateEntry(entry, params, tilesCreator) { + super.updateEntry(entry, params, tilesCreator); if (!entry.isGap) { return UpdateAction.Remove(); } else { diff --git a/src/domain/session/room/timeline/tiles/SimpleTile.js b/src/domain/session/room/timeline/tiles/SimpleTile.js index 4c1c1de0..46e8aa3a 100644 --- a/src/domain/session/room/timeline/tiles/SimpleTile.js +++ b/src/domain/session/room/timeline/tiles/SimpleTile.js @@ -92,7 +92,7 @@ export class SimpleTile extends ViewModel { } // update received for already included (falls within sort keys) entry - updateEntry(entry, param) { + updateEntry(entry, param, tilesCreator) { const renderedAsRedacted = this.shape === "redacted"; if (!entry.isGap && entry.isRedacted !== renderedAsRedacted) { // recreate the tile if the entry becomes redacted