You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-05 23:10:41 +03:00
No need to set options in WillStartClient
We can set them any time up to that point
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user