Small changes to prepare auto update for release
This commit is contained in:
parent
daca49dc15
commit
8c0bf32fe5
3 changed files with 5 additions and 4 deletions
|
@ -20,6 +20,7 @@
|
|||
"dev": "electron-webpack dev",
|
||||
"compile": "electron-webpack && yarn extract-langs",
|
||||
"build": "yarn compile && electron-builder build",
|
||||
"build:dir": "yarn build -- --dir -c.compression=store -c.mac.identity=null",
|
||||
"postinstall": "electron-builder install-app-deps",
|
||||
"postmerge": "yarnhook",
|
||||
"postcheckout": "yarnhook",
|
||||
|
|
|
@ -6,7 +6,6 @@ import url from 'url';
|
|||
import https from 'https';
|
||||
import { shell, app, ipcMain, dialog } from 'electron';
|
||||
import { autoUpdater } from 'electron-updater';
|
||||
import log from 'electron-log';
|
||||
import Daemon from './Daemon';
|
||||
import Tray from './Tray';
|
||||
import createWindow from './createWindow';
|
||||
|
@ -23,7 +22,7 @@ let autoUpdateDownloaded = false;
|
|||
// Keeps track of whether the user has accepted an auto-update through the interface.
|
||||
let autoUpdateAccepted = false;
|
||||
|
||||
// This is used to keep track of whether we are showing he special dialog
|
||||
// This is used to keep track of whether we are showing the special dialog
|
||||
// that we show on Windows after you decline an upgrade and close the app later.
|
||||
let showingAutoUpdateCloseAlert = false;
|
||||
|
||||
|
@ -86,7 +85,7 @@ app.on('activate', () => {
|
|||
if (!rendererWindow) rendererWindow = createWindow();
|
||||
});
|
||||
|
||||
app.on('will-quit', (e) => {
|
||||
app.on('will-quit', (event) => {
|
||||
if (process.platform === 'win32' && autoUpdateDownloaded && !autoUpdateAccepted && !showingAutoUpdateCloseAlert) {
|
||||
// We're on Win and have an update downloaded, but the user declined it (or closed
|
||||
// the app without accepting it). Now the user is closing the app, so the new update
|
||||
|
@ -102,7 +101,7 @@ app.on('will-quit', (e) => {
|
|||
app.quit();
|
||||
});
|
||||
|
||||
e.preventDefault();
|
||||
event.preventDefault();
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -10,6 +10,7 @@ import React from 'react';
|
|||
import ReactDOM from 'react-dom';
|
||||
import { Provider } from 'react-redux';
|
||||
import { doConditionalAuthNavigate, doDaemonReady, doShowSnackBar, doAutoUpdate } from 'redux/actions/app';
|
||||
import { doUpdateIsNightAsync } from 'redux/actions/settings';
|
||||
import { doNavigate } from 'redux/actions/navigation';
|
||||
import { doDownloadLanguages } from 'redux/actions/settings';
|
||||
import { doUserEmailVerify } from 'redux/actions/user';
|
||||
|
|
Loading…
Reference in a new issue