Update config of main process when the config file is updated

This commit is contained in:
Yuya Ochiai
2016-06-17 23:50:41 +09:00
parent 517cc16835
commit 96e52b6e85
2 changed files with 4 additions and 0 deletions

View File

@@ -86,6 +86,7 @@ var SettingsPage = React.createClass({
}
ipcRenderer.send('update-menu', config);
ipcRenderer.send('update-config');
if (typeof toIndex == 'undefined' || toIndex) {
backToIndex();

View File

@@ -66,6 +66,9 @@ catch (e) {
config = settings.loadDefault();
console.log('Failed to read or upgrade config.json');
}
ipcMain.on('update-config', () => {
config = settings.readFileSync(configFile);
});
// Only for OS X
const switchMenuIconImages = function(icons, isDarkMode) {