Fix the timing to apply new config

This commit is contained in:
Yuya Ochiai
2017-02-18 00:22:16 +09:00
parent f234f1bc95
commit 9f55055cb3
2 changed files with 4 additions and 2 deletions

View File

@@ -112,13 +112,13 @@ const SettingsPage = React.createClass({
showUnreadBadge: this.state.showUnreadBadge
};
ipcRenderer.send('update-menu', config);
ipcRenderer.send('update-config');
settings.writeFile(this.props.configFile, config, (err) => {
if (err) {
callback(err);
return;
}
ipcRenderer.send('update-menu', config);
ipcRenderer.send('update-config');
if (process.platform === 'win32' || process.platform === 'linux') {
const autostart = this.state.autostart;
this.saveAutoStart(autostart, callback);

View File

@@ -86,6 +86,8 @@ function showUnreadBadge(unreadCount, mentionCount) {
function teamConfigChange(teams) {
AppConfig.set('teams', teams);
ipcRenderer.send('update-menu', AppConfig.data);
ipcRenderer.send('update-config');
}
const parsedURL = url.parse(window.location.href, true);