You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-14 19:02:33 +03:00
SessionStore extends flux.Store
This commit is contained in:
@@ -252,7 +252,7 @@ module.exports = React.createClass({
|
||||
}
|
||||
|
||||
this._sessionStore = sessionStore;
|
||||
this._sessionStore.on('update', this._setStateFromSessionStore);
|
||||
this._sessionStore.addListener(this._setStateFromSessionStore);
|
||||
this._setStateFromSessionStore();
|
||||
},
|
||||
|
||||
|
||||
@@ -68,15 +68,15 @@ module.exports = React.createClass({
|
||||
},
|
||||
|
||||
componentWillMount: function() {
|
||||
this.sessionStore = sessionStore;
|
||||
this.sessionStore.on('update', this.setStateFromSessionStore);
|
||||
this._sessionStore = sessionStore;
|
||||
this._sessionStore.addListener(this._setStateFromSessionStore);
|
||||
|
||||
this.setStateFromSessionStore();
|
||||
this._setStateFromSessionStore();
|
||||
},
|
||||
|
||||
setStateFromSessionStore: function() {
|
||||
_setStateFromSessionStore: function() {
|
||||
this.setState({
|
||||
cachedPassword: this.sessionStore.getCachedPassword(),
|
||||
cachedPassword: this._sessionStore.getCachedPassword(),
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user