Handle redaction
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>pull/21833/head
parent
9455a6d772
commit
bc7a8f8406
|
@ -45,6 +45,7 @@ export default class ReplyTile extends React.PureComponent<IProps> {
|
|||
|
||||
componentDidMount() {
|
||||
this.props.mxEvent.on("Event.decrypted", this.onDecrypted);
|
||||
this.props.mxEvent.on("Event.beforeRedaction", this.onBeforeRedaction);
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
|
@ -58,6 +59,11 @@ export default class ReplyTile extends React.PureComponent<IProps> {
|
|||
}
|
||||
};
|
||||
|
||||
private onBeforeRedaction = (): void => {
|
||||
// When the event gets redacted, update it, so that a different tile handler is used
|
||||
this.forceUpdate();
|
||||
};
|
||||
|
||||
private onClick = (e: React.MouseEvent): void => {
|
||||
// This allows the permalink to be opened in a new tab/window or copied as
|
||||
// matrix.to, but also for it to enable routing within Riot when clicked.
|
||||
|
|
Loading…
Reference in New Issue