From f379bf234196a5ffb3bb3de2f1b304fa0c4262f7 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Mon, 17 Jan 2022 16:48:17 +0100 Subject: [PATCH 1/2] ensure images load in reply preview in composer --- src/domain/session/room/ComposerViewModel.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/domain/session/room/ComposerViewModel.js b/src/domain/session/room/ComposerViewModel.js index 81a8fc17..730e1b20 100644 --- a/src/domain/session/room/ComposerViewModel.js +++ b/src/domain/session/room/ComposerViewModel.js @@ -30,6 +30,7 @@ export class ComposerViewModel extends ViewModel { this._replyVM = this.disposeTracked(this._replyVM); if (entry) { this._replyVM = this.track(this._roomVM._createTile(entry)); + this._replyVM.notifyVisible(); } this.emitChange("replyViewModel"); this.emit("focus"); From b0e8506cb517fdbbdaaed97434311da6e5dd3ddd Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Mon, 17 Jan 2022 16:48:36 +0100 Subject: [PATCH 2/2] ensure images load in reply preview in timeline --- src/domain/session/room/timeline/tiles/BaseMessageTile.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/domain/session/room/timeline/tiles/BaseMessageTile.js b/src/domain/session/room/timeline/tiles/BaseMessageTile.js index d04ee495..6b0b4356 100644 --- a/src/domain/session/room/timeline/tiles/BaseMessageTile.js +++ b/src/domain/session/room/timeline/tiles/BaseMessageTile.js @@ -31,6 +31,12 @@ export class BaseMessageTile extends SimpleTile { this._updateReplyTileIfNeeded(options.tilesCreator, undefined); } + notifyVisible() { + super.notifyVisible(); + this._replyTile?.notifyVisible(); + } + + get _mediaRepository() { return this._room.mediaRepository; }