mirror of
https://github.com/element-hq/element-web
synced 2024-11-27 19:56:47 +03:00
Fix stopPeeking not being called at the right time
stopPeeking is currently not called when navigating to a joined room after having peeked a room. This causes the /events endpoint for the peeked room to be called until peeking another room, even when not viewing the peeked room anymore. The current code would only stop peeking if you joining were true (note the nesting), e.g. when waiting for your join to be confirmed by /sync. This change might make stopPeeking called also when not needed by there is a guard in that method to do nothing if not currently peeking.
This commit is contained in:
parent
b482a4cdd3
commit
b412b9e84d
1 changed files with 4 additions and 4 deletions
|
@ -299,12 +299,12 @@ module.exports = React.createClass({
|
|||
throw err;
|
||||
}
|
||||
});
|
||||
}
|
||||
} else if (room) {
|
||||
// Stop peeking because we have joined this room previously
|
||||
MatrixClientPeg.get().stopPeeking();
|
||||
this.setState({isPeeking: false});
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
_shouldShowApps: function(room) {
|
||||
|
|
Loading…
Reference in a new issue