Skip to content

Commit

Permalink
Merge pull request #571 from mattermost/fix-hidden-flag
Browse files Browse the repository at this point in the history
Fix --hidden not working on Linux
  • Loading branch information
yuya-oc committed Aug 18, 2017
2 parents 544a243 + 400f084 commit 6d0e1f7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Expand Up @@ -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
Expand Down
8 changes: 5 additions & 3 deletions src/main/mainWindow.js
Expand Up @@ -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();
Expand All @@ -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();
Expand Down

0 comments on commit 6d0e1f7

Please sign in to comment.