[ISSUE 224] fixed
This commit is contained in:
parent
f7cc055b96
commit
e562e4b334
|
@ -5,7 +5,6 @@ import { app, BrowserWindow, screen, ipcMain, IpcMainEvent } from 'electron';
|
||||||
import windowStateKeeper from 'electron-window-state';
|
import windowStateKeeper from 'electron-window-state';
|
||||||
import { EventEmitter } from 'events';
|
import { EventEmitter } from 'events';
|
||||||
|
|
||||||
import { now } from '../util/now';
|
|
||||||
import { registerWindowStateChangedEvents } from '../lib/window-state';
|
import { registerWindowStateChangedEvents } from '../lib/window-state';
|
||||||
import {
|
import {
|
||||||
ElectronAppChannel,
|
ElectronAppChannel,
|
||||||
|
@ -13,6 +12,9 @@ import {
|
||||||
ElectronWebContentsChannel
|
ElectronWebContentsChannel
|
||||||
} from '@ucap-webmessenger/electron-core';
|
} from '@ucap-webmessenger/electron-core';
|
||||||
|
|
||||||
|
import { appStorage } from '../lib/storage';
|
||||||
|
import { now } from '../util/now';
|
||||||
|
|
||||||
export class AppWindow {
|
export class AppWindow {
|
||||||
private window: BrowserWindow | null = null;
|
private window: BrowserWindow | null = null;
|
||||||
|
|
||||||
|
@ -55,7 +57,8 @@ export class AppWindow {
|
||||||
nodeIntegration: true
|
nodeIntegration: true
|
||||||
},
|
},
|
||||||
acceptFirstMouse: true,
|
acceptFirstMouse: true,
|
||||||
icon: this.appIconPath
|
icon: this.appIconPath,
|
||||||
|
show: !appStorage.startupHideWindow
|
||||||
};
|
};
|
||||||
|
|
||||||
if (__DARWIN__) {
|
if (__DARWIN__) {
|
||||||
|
|
|
@ -55,7 +55,7 @@ import {
|
||||||
import log from 'electron-log';
|
import log from 'electron-log';
|
||||||
|
|
||||||
import { RendererUpdater } from './lib/renderer-updater';
|
import { RendererUpdater } from './lib/renderer-updater';
|
||||||
import { Storage } from './lib/storage';
|
import { appStorage } from './lib/storage';
|
||||||
|
|
||||||
const appIconPath = __LINUX__
|
const appIconPath = __LINUX__
|
||||||
? __DEV__
|
? __DEV__
|
||||||
|
@ -88,7 +88,6 @@ let preventQuit = false;
|
||||||
|
|
||||||
let notificationService: ElectronNotificationService | null;
|
let notificationService: ElectronNotificationService | null;
|
||||||
let updateWindowService: ElectronUpdateWindowService | null;
|
let updateWindowService: ElectronUpdateWindowService | null;
|
||||||
const appStorage: Storage = new Storage();
|
|
||||||
|
|
||||||
function handleUncaughtException(error: Error) {
|
function handleUncaughtException(error: Error) {
|
||||||
preventQuit = true;
|
preventQuit = true;
|
||||||
|
|
|
@ -45,3 +45,5 @@ export class Storage {
|
||||||
this.store.set(STORE_KEY_DOWNLOADFOLDER, downloadPath);
|
this.store.set(STORE_KEY_DOWNLOADFOLDER, downloadPath);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const appStorage: Storage = new Storage();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user