You've already forked element-web
mirror of
https://github.com/element-hq/element-web.git
synced 2025-11-29 21:23:11 +03:00
set autoPeekDone on finally
This commit is contained in:
@@ -119,10 +119,6 @@ module.exports = React.createClass({
|
|||||||
if (this.props.autoPeek) {
|
if (this.props.autoPeek) {
|
||||||
console.log("Attempting to peek into room %s", this.props.roomId);
|
console.log("Attempting to peek into room %s", this.props.roomId);
|
||||||
MatrixClientPeg.get().peekInRoom(this.props.roomId).done(() => {
|
MatrixClientPeg.get().peekInRoom(this.props.roomId).done(() => {
|
||||||
this.setState({
|
|
||||||
autoPeekDone: true
|
|
||||||
});
|
|
||||||
|
|
||||||
// we don't need to do anything - JS SDK will emit Room events
|
// we don't need to do anything - JS SDK will emit Room events
|
||||||
// which will update the UI. We *do* however need to know if we
|
// which will update the UI. We *do* however need to know if we
|
||||||
// can join the room so we can fiddle with the UI appropriately.
|
// can join the room so we can fiddle with the UI appropriately.
|
||||||
@@ -130,6 +126,10 @@ module.exports = React.createClass({
|
|||||||
// ...XXX: or do we? can't we just do them onNewRoom?
|
// ...XXX: or do we? can't we just do them onNewRoom?
|
||||||
}, function(err) {
|
}, function(err) {
|
||||||
console.error("Failed to peek into room: %s", err);
|
console.error("Failed to peek into room: %s", err);
|
||||||
|
}).finally((() => {
|
||||||
|
this.setState({
|
||||||
|
autoPeekDone: true
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user