Skip to content

Commit

Permalink
Start from pinned icon
Browse files Browse the repository at this point in the history
  • Loading branch information
adlk committed Nov 2, 2017
1 parent 11a23cf commit 28e993e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
"classnames": "^2.2.5",
"electron-fetch": "^1.1.0",
"electron-spellchecker": "^1.2.0",
"electron-squirrel-startup": "^1.0.0",
"electron-updater": "^2.4.3",
"electron-window-state": "^4.1.0",
"fs-extra": "^3.0.1",
Expand Down
9 changes: 3 additions & 6 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,14 @@ import { app, BrowserWindow, shell } from 'electron';
import fs from 'fs-extra';
import path from 'path';

/* eslint-disable */
if (require('electron-squirrel-startup')) app.quit();

import windowStateKeeper from 'electron-window-state';

import { isDevMode, isWindows } from './environment';
import ipcApi from './electron/ipc-api';
import Tray from './lib/Tray';
import Settings from './electron/Settings';
import { appId } from './package.json';
import { appId } from './package.json'; // eslint-disable-line import/no-unresolved
import './electron/exception';
/* eslint-enable */

// Keep a global reference of the window object, if you don't, the window will
// be closed automatically when the JavaScript object is garbage collected.
Expand All @@ -32,9 +28,10 @@ if (isWindows) {
if (process.platform !== 'darwin') {
const isSecondInstance = app.makeSingleInstance(() => {
if (mainWindow) {
if (mainWindow.isMinimized()) mainWindow.show();
if (mainWindow.isMinimized()) mainWindow.restore();
mainWindow.focus();
}
return true;
});

if (isSecondInstance) {
Expand Down

0 comments on commit 28e993e

Please sign in to comment.