Remove SdkConfig
just take a config in MatrixChat, pass the individual things down through the chain. This may become unwieldy: let's see how it goes.
This commit is contained in:
parent
12816c5e1f
commit
7e8c8dd336
3 changed files with 5 additions and 53 deletions
|
@ -19,7 +19,6 @@ var url = require('url');
|
|||
var Favico = require('favico.js');
|
||||
|
||||
var MatrixClientPeg = require("../../MatrixClientPeg");
|
||||
var SdkConfig = require("../../SdkConfig");
|
||||
var Notifier = require("../../Notifier");
|
||||
var ContextualMenu = require("../../ContextualMenu");
|
||||
var RoomListSorter = require("../../RoomListSorter");
|
||||
|
@ -124,7 +123,6 @@ module.exports = React.createClass({
|
|||
},
|
||||
|
||||
componentWillMount: function() {
|
||||
SdkConfig.put(this.props.config);
|
||||
this.favicon = new Favico({animation: 'none'});
|
||||
},
|
||||
|
||||
|
@ -1094,7 +1092,7 @@ module.exports = React.createClass({
|
|||
right_panel = <RightPanel roomId={this.state.currentRoom} collapsed={this.state.collapse_rhs} opacity={this.state.sideOpacity} />
|
||||
break;
|
||||
case this.PageTypes.UserSettings:
|
||||
page_element = <UserSettings onClose={this.onUserSettingsClose} version={this.state.version} />
|
||||
page_element = <UserSettings onClose={this.onUserSettingsClose} version={this.state.version} brand={this.props.config.brand} />
|
||||
right_panel = <RightPanel collapsed={this.state.collapse_rhs} opacity={this.state.sideOpacity}/>
|
||||
break;
|
||||
case this.PageTypes.CreateRoom:
|
||||
|
|
|
@ -31,7 +31,9 @@ module.exports = React.createClass({
|
|||
|
||||
propTypes: {
|
||||
version: React.PropTypes.string,
|
||||
onClose: React.PropTypes.func
|
||||
onClose: React.PropTypes.func,
|
||||
// The brand string given when creating email pushers
|
||||
brand: React.PropTypes.string,
|
||||
},
|
||||
|
||||
getDefaultProps: function() {
|
||||
|
@ -333,7 +335,7 @@ module.exports = React.createClass({
|
|||
<h3>Notifications</h3>
|
||||
|
||||
<div className="mx_UserSettings_section">
|
||||
<Notifications threepids={this.state.threepids} />
|
||||
<Notifications threepids={this.state.threepids} brand={this.props.brand} />
|
||||
</div>
|
||||
</div>);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue