Merge pull request #571 from mattermost/fix-hidden-flag

Fix --hidden not working on Linux
This commit is contained in:
Yuya Ochiai
2017-08-19 00:08:02 +09:00
committed by GitHub
2 changed files with 8 additions and 3 deletions

View File

@@ -42,6 +42,9 @@ Release date: TBD
- Fixed an issue where the text box didn't keep focus after uploading a file.
[#341](https://github.com/mattermost/desktop/issues/341)
#### Linux
- Fixed the main window not minimized when the app is launched via "Start app on Login" option.
[#570](https://github.com/mattermost/desktop/issues/570)
---
## Release v3.7.0

View File

@@ -42,6 +42,11 @@ function createMainWindow(config, options) {
});
const mainWindow = new BrowserWindow(windowOptions);
const indexURL = global.isDev ? 'http://localhost:8080/browser/index.html' : `file://${app.getAppPath()}/browser/index.html`;
mainWindow.loadURL(indexURL);
// This section should be called after loadURL() #570
if (options.hideOnStartup) {
if (windowOptions.maximized) {
mainWindow.maximize();
@@ -59,9 +64,6 @@ function createMainWindow(config, options) {
webPreferences.nodeIntegration = false;
});
const indexURL = global.isDev ? 'http://localhost:8080/browser/index.html' : `file://${app.getAppPath()}/browser/index.html`;
mainWindow.loadURL(indexURL);
mainWindow.once('ready-to-show', () => {
if (process.platform !== 'darwin') {
mainWindow.show();