Fix the timing to apply new config
This commit is contained in:
@@ -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);
|
||||
|
@@ -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);
|
||||
|
Reference in New Issue
Block a user