Fix the timing to apply new config
This commit is contained in:
@@ -112,13 +112,13 @@ const SettingsPage = React.createClass({
|
|||||||
showUnreadBadge: this.state.showUnreadBadge
|
showUnreadBadge: this.state.showUnreadBadge
|
||||||
};
|
};
|
||||||
|
|
||||||
ipcRenderer.send('update-menu', config);
|
|
||||||
ipcRenderer.send('update-config');
|
|
||||||
settings.writeFile(this.props.configFile, config, (err) => {
|
settings.writeFile(this.props.configFile, config, (err) => {
|
||||||
if (err) {
|
if (err) {
|
||||||
callback(err);
|
callback(err);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
ipcRenderer.send('update-menu', config);
|
||||||
|
ipcRenderer.send('update-config');
|
||||||
if (process.platform === 'win32' || process.platform === 'linux') {
|
if (process.platform === 'win32' || process.platform === 'linux') {
|
||||||
const autostart = this.state.autostart;
|
const autostart = this.state.autostart;
|
||||||
this.saveAutoStart(autostart, callback);
|
this.saveAutoStart(autostart, callback);
|
||||||
|
@@ -86,6 +86,8 @@ function showUnreadBadge(unreadCount, mentionCount) {
|
|||||||
|
|
||||||
function teamConfigChange(teams) {
|
function teamConfigChange(teams) {
|
||||||
AppConfig.set('teams', teams);
|
AppConfig.set('teams', teams);
|
||||||
|
ipcRenderer.send('update-menu', AppConfig.data);
|
||||||
|
ipcRenderer.send('update-config');
|
||||||
}
|
}
|
||||||
|
|
||||||
const parsedURL = url.parse(window.location.href, true);
|
const parsedURL = url.parse(window.location.href, true);
|
||||||
|
Reference in New Issue
Block a user