improve config notifications

This commit is contained in:
Guillermo Rauch 2016-07-08 07:40:27 -07:00
parent 7ab272a9fe
commit 8c0d94aa1d
2 changed files with 2 additions and 1 deletions

View file

@ -16,7 +16,6 @@ export default class Config extends React.Component {
}
onChange () {
new Notification('HyperTerm configuration reloaded!');
this.setState({ config: config.getConfig() });
}

View file

@ -4,6 +4,7 @@ const { resolve } = require('path');
const { readFileSync, writeFileSync } = require('fs');
const gaze = require('gaze');
const vm = require('vm');
const notify = require('./notify');
const path = resolve(homedir(), '.hyperterm.js');
const watchers = [];
@ -16,6 +17,7 @@ function watch () {
this.on('changed', () => {
try {
if (exec(readFileSync(path, 'utf8'))) {
notify('HyperTerm configuration reloaded!');
watchers.forEach((fn) => fn());
}
} catch (err) {