mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-12-27 19:07:15 +08:00
Prevent that Mailspring closes on setup of the first mail account
This commit is contained in:
parent
21808541a8
commit
84e53ca462
1 changed files with 3 additions and 1 deletions
|
@ -221,7 +221,9 @@ export default class MailspringWindow extends EventEmitter {
|
||||||
}
|
}
|
||||||
|
|
||||||
const isLastWindow = global.application.windowManager.getVisibleWindowCount() === 1;
|
const isLastWindow = global.application.windowManager.getVisibleWindowCount() === 1;
|
||||||
const isTrayEnabled = global.application.config.get('core.workspace.systemTray');
|
// The configuration value may be `undefined` when it has not been manually set to true in the preferences
|
||||||
|
// This check against false prevents that Mailspring is closed when configuring the first mail account
|
||||||
|
const isTrayEnabled = global.application.config.get('core.workspace.systemTray') !== false;
|
||||||
const runWithoutWindowsOpen = isTrayEnabled || process.platform === 'darwin';
|
const runWithoutWindowsOpen = isTrayEnabled || process.platform === 'darwin';
|
||||||
|
|
||||||
if (isLastWindow && !runWithoutWindowsOpen) {
|
if (isLastWindow && !runWithoutWindowsOpen) {
|
||||||
|
|
Loading…
Reference in a new issue