mirror of
https://github.com/element-hq/element-web
synced 2024-11-24 18:25:49 +03:00
onEvent -> onStateEvent
Signed-off-by: Travis Ralston <travpc@gmail.com>
This commit is contained in:
parent
085271a864
commit
929da30df8
1 changed files with 3 additions and 3 deletions
|
@ -39,16 +39,16 @@ module.exports = React.createClass({
|
|||
|
||||
componentDidMount: function() {
|
||||
this._updatePinnedMessages();
|
||||
MatrixClientPeg.get().on("RoomState.events", this._onEvent);
|
||||
MatrixClientPeg.get().on("RoomState.events", this._onStateEvent);
|
||||
},
|
||||
|
||||
componentWillUnmount: function() {
|
||||
if (MatrixClientPeg.get()) {
|
||||
MatrixClientPeg.get().removeListener("RoomState.events", this._onEvent);
|
||||
MatrixClientPeg.get().removeListener("RoomState.events", this._onStateEvent);
|
||||
}
|
||||
},
|
||||
|
||||
_onEvent: function(ev) {
|
||||
_onStateEvent: function(ev) {
|
||||
if (ev.getRoomId() === this.props.room.roomId && ev.getType() === "m.room.pinned_events") {
|
||||
this._updatePinnedMessages();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue