mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-02-20 22:23:53 +08:00
refactor(tray): Update main file for tray package
This commit is contained in:
parent
d18642fb3e
commit
9060d1642c
1 changed files with 7 additions and 7 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue