mirror of
https://github.com/element-hq/element-web
synced 2024-11-27 19:56:47 +03:00
Event.decrypted from the client
This commit is contained in:
parent
bf8a3d4419
commit
8370fa8bb4
1 changed files with 4 additions and 2 deletions
|
@ -91,17 +91,19 @@ export default class RoomTile2 extends React.Component<IProps, IState> {
|
||||||
|
|
||||||
this.props.room.on("Room.receipt", this.handleRoomEventUpdate);
|
this.props.room.on("Room.receipt", this.handleRoomEventUpdate);
|
||||||
this.props.room.on("Room.timeline", this.handleRoomEventUpdate);
|
this.props.room.on("Room.timeline", this.handleRoomEventUpdate);
|
||||||
this.props.room.on("Event.decrypted", this.handleRoomEventUpdate);
|
|
||||||
this.props.room.on("Room.redaction", this.handleRoomEventUpdate);
|
this.props.room.on("Room.redaction", this.handleRoomEventUpdate);
|
||||||
|
MatrixClientPeg.get().on("Event.decrypted", this.handleRoomEventUpdate);
|
||||||
}
|
}
|
||||||
|
|
||||||
public componentWillUnmount() {
|
public componentWillUnmount() {
|
||||||
if (this.props.room) {
|
if (this.props.room) {
|
||||||
this.props.room.removeListener("Room.receipt", this.handleRoomEventUpdate);
|
this.props.room.removeListener("Room.receipt", this.handleRoomEventUpdate);
|
||||||
this.props.room.removeListener("Room.timeline", this.handleRoomEventUpdate);
|
this.props.room.removeListener("Room.timeline", this.handleRoomEventUpdate);
|
||||||
this.props.room.removeListener("Event.decrypted", this.handleRoomEventUpdate);
|
|
||||||
this.props.room.removeListener("Room.redaction", this.handleRoomEventUpdate);
|
this.props.room.removeListener("Room.redaction", this.handleRoomEventUpdate);
|
||||||
}
|
}
|
||||||
|
if (MatrixClientPeg.get()) {
|
||||||
|
MatrixClientPeg.get().removeListener("Event.decrypted", this.handleRoomEventUpdate);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// XXX: This is a bit of an awful-looking hack. We should probably be using state for
|
// XXX: This is a bit of an awful-looking hack. We should probably be using state for
|
||||||
|
|
Loading…
Reference in a new issue