mirror of
https://github.com/hcengineering/platform.git
synced 2024-11-22 11:42:30 +03:00
uberf-8210: allow only one upgrade (#6684)
Signed-off-by: Alexey Zinoviev <alexey.zinoviev@xored.com>
This commit is contained in:
parent
bbe2e4e9ce
commit
678da06af4
@ -365,7 +365,12 @@ if (isMac) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Note: it is reset when the app is relaunched after update
|
||||||
|
let isUpdating = false
|
||||||
|
|
||||||
autoUpdater.on('update-available', (info: UpdateInfo) => {
|
autoUpdater.on('update-available', (info: UpdateInfo) => {
|
||||||
|
if (isUpdating) return
|
||||||
|
|
||||||
void dialog
|
void dialog
|
||||||
.showMessageBox({
|
.showMessageBox({
|
||||||
type: 'info',
|
type: 'info',
|
||||||
@ -379,6 +384,7 @@ autoUpdater.on('update-available', (info: UpdateInfo) => {
|
|||||||
if (response !== 0) {
|
if (response !== 0) {
|
||||||
app.quit()
|
app.quit()
|
||||||
}
|
}
|
||||||
|
isUpdating = true
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -400,7 +406,7 @@ autoUpdater.on('update-downloaded', (info) => {
|
|||||||
ipcMain.on('start-backup', (event, token, endpoint, workspace) => {
|
ipcMain.on('start-backup', (event, token, endpoint, workspace) => {
|
||||||
console.log('start backup', token, endpoint, workspace)
|
console.log('start backup', token, endpoint, workspace)
|
||||||
if (mainWindow != null) {
|
if (mainWindow != null) {
|
||||||
startBackup(mainWindow, token, endpoint, workspace , (cmd: string, ...args: any[]) => {
|
startBackup(mainWindow, token, endpoint, workspace, (cmd: string, ...args: any[]) => {
|
||||||
mainWindow?.webContents.send(cmd, ...args)
|
mainWindow?.webContents.send(cmd, ...args)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user