Fix msgtype changes from edits not rerendering timeline tiles (#33416)

* Fix msgtype changes from edits not rerendering timeline tiles

* Change approach to view model listeners instead

* Repaint the mounted tile on MatrixEventEvent.Replaced
This commit is contained in:
rbondesson
2026-05-08 09:33:23 +00:00
committed by GitHub
parent 1b9c9cb92f
commit a1c1d330e9
5 changed files with 126 additions and 4 deletions
@@ -620,6 +620,7 @@ export class UnwrappedEventTile extends React.Component<EventTileProps, IState>
/** called when the event is edited after we show it. */
private readonly onReplaced = (): void => {
this.forceUpdate();
// re-verify the event if it is replaced (the edit may not be verified)
this.verifyEvent();
};
@@ -995,6 +996,7 @@ export class UnwrappedEventTile extends React.Component<EventTileProps, IState>
public render(): ReactNode {
const msgtype = this.props.mxEvent.getContent().msgtype;
const eventType = this.props.mxEvent.getType();
const replacingEventId = this.props.mxEvent.replacingEventId();
const {
hasRenderer,
@@ -1335,6 +1337,7 @@ export class UnwrappedEventTile extends React.Component<EventTileProps, IState>
// overrides
ref: this.tile,
replacingEventId,
isSeeingThroughMessageHiddenForModeration,
// appease TS