You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-07-31 13:44:28 +03:00
correctly load synced themes without NPE
This commit is contained in:
@ -588,13 +588,6 @@ module.exports = React.createClass({
|
|||||||
_onLoadCompleted: function() {
|
_onLoadCompleted: function() {
|
||||||
this.props.onLoadCompleted();
|
this.props.onLoadCompleted();
|
||||||
this.setState({loading: false});
|
this.setState({loading: false});
|
||||||
|
|
||||||
// set up the right theme.
|
|
||||||
// XXX: this will temporarily flicker the wrong CSS.
|
|
||||||
dis.dispatch({
|
|
||||||
action: 'set_theme',
|
|
||||||
value: UserSettingsStore.getSyncedSetting('theme')
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -730,6 +723,16 @@ module.exports = React.createClass({
|
|||||||
action: 'logout'
|
action: 'logout'
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
cli.on("accountData", function(ev) {
|
||||||
|
if (ev.getType() === 'im.vector.web.settings') {
|
||||||
|
if (ev.getContent() && ev.getContent().theme) {
|
||||||
|
dis.dispatch({
|
||||||
|
action: 'set_theme',
|
||||||
|
value: ev.getContent().theme,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
onFocus: function(ev) {
|
onFocus: function(ev) {
|
||||||
|
Reference in New Issue
Block a user