refactor(tray): Update main file for tray package

This commit is contained in:
Juan Tejada 2015-12-21 13:54:40 -08:00
parent d18642fb3e
commit 9060d1642c

View file

@ -12,15 +12,15 @@ export function deactivate() {
unsubConfig();
}
const onSystemTrayToggle = (showSystemTray)=> {
deactivate();
if (showSystemTray.newValue) {
systemTray = new SystemTray(platform);
}
};
export function activate() {
deactivate();
const onSystemTrayToggle = (showSystemTray)=> {
deactivate();
if (showSystemTray.newValue) {
systemTray = new SystemTray(platform);
}
};
unsubConfig = NylasEnv.config.onDidChange('core.workspace.systemTray', onSystemTrayToggle).dispose;
if (NylasEnv.config.get('core.workspace.systemTray')) {
systemTray = new SystemTray(platform);