Move sessionStore ref from MatrixChat to LoggedInView
MatrixChat didn't actually use the sessionStore, so this is one less prop to pass.
This commit is contained in:
parent
da3cb0ee48
commit
f73cf772fb
2 changed files with 12 additions and 17 deletions
|
@ -40,8 +40,6 @@ var PageTypes = require('../../PageTypes');
|
|||
var createRoom = require("../../createRoom");
|
||||
import * as UDEHandler from '../../UnknownDeviceErrorHandler';
|
||||
|
||||
import sessionStore from '../../stores/SessionStore';
|
||||
|
||||
module.exports = React.createClass({
|
||||
displayName: 'MatrixChat',
|
||||
|
||||
|
@ -250,10 +248,6 @@ module.exports = React.createClass({
|
|||
register_hs_url: paramHs,
|
||||
});
|
||||
}
|
||||
|
||||
this._sessionStore = sessionStore;
|
||||
this._sessionStore.addListener(this._setStateFromSessionStore);
|
||||
this._setStateFromSessionStore();
|
||||
},
|
||||
|
||||
componentDidMount: function() {
|
||||
|
@ -897,12 +891,6 @@ module.exports = React.createClass({
|
|||
});
|
||||
},
|
||||
|
||||
_setStateFromSessionStore() {
|
||||
this.setState({
|
||||
userHasGeneratedPassword: Boolean(this._sessionStore.getCachedPassword()),
|
||||
});
|
||||
},
|
||||
|
||||
onFocus: function(ev) {
|
||||
dis.dispatch({action: 'focus_composer'});
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue