1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-24 10:27:10 +02:00

Electron: Resolves #714: Allow starting application minimised in the tray icon

This commit is contained in:
Laurent Cozic 2018-09-06 18:56:23 +01:00
parent a1e7e29279
commit 643e5a6a2a
2 changed files with 6 additions and 0 deletions

View File

@ -758,6 +758,10 @@ class Application extends BaseApplication {
AlarmService.garbageCollect();
}, 1000 * 60 * 60);
if (Setting.value('startMinimized') && Setting.value('showTrayIcon')) {
bridge().window().hide();
}
ResourceService.runInBackground();
if (Setting.value('env') === 'dev') {

View File

@ -93,6 +93,8 @@ class Setting extends BaseModel {
return platform === 'linux' ? _('Note: Does not work in all desktop environments.') : null;
}},
'startMinimized': { value: false, type: Setting.TYPE_BOOL, public: true, appTypes: ['desktop'], label: () => _('Start application minimised in the tray icon') },
'collapsedFolderIds': { value: [], type: Setting.TYPE_ARRAY, public: false },
'encryption.enabled': { value: false, type: Setting.TYPE_BOOL, public: false },