No need to set options in WillStartClient
We can set them any time up to that point
This commit is contained in:
parent
0c2bd10594
commit
4825ab8fe7
2 changed files with 8 additions and 7 deletions
|
@ -146,6 +146,10 @@ module.exports = React.createClass({
|
|||
// whilst logged in as a guest user (so they can change
|
||||
// their mind & log back in)
|
||||
this.guestCreds = null;
|
||||
|
||||
if (this.props.config.sync_timeline_limit) {
|
||||
MatrixClientPeg.opts.initialSyncLimit = this.props.config.sync_timeline_limit;
|
||||
}
|
||||
},
|
||||
|
||||
componentDidMount: function() {
|
||||
|
@ -601,15 +605,11 @@ module.exports = React.createClass({
|
|||
|
||||
/**
|
||||
* Called just before the matrix client is started
|
||||
* (useful for setting options and listeners)
|
||||
* (useful for setting listeners)
|
||||
*/
|
||||
_onWillStartClient() {
|
||||
var cli = MatrixClientPeg.get();
|
||||
|
||||
if (this.props.config.sync_timeline_limit) {
|
||||
MatrixClientPeg.opts.initialSyncLimit = this.props.config.sync_timeline_limit;
|
||||
}
|
||||
|
||||
var self = this;
|
||||
cli.on('sync', function(state, prevState) {
|
||||
self.updateFavicon(state, prevState);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue