Flatten autoupdater hooks
This commit is contained in:
@ -5,6 +5,7 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
- pierremtb/update-download-progress-flatten
|
||||||
release:
|
release:
|
||||||
types: [published]
|
types: [published]
|
||||||
schedule:
|
schedule:
|
||||||
|
|||||||
23
src/main.ts
23
src/main.ts
@ -268,19 +268,20 @@ app.on('ready', () => {
|
|||||||
|
|
||||||
autoUpdater.on('update-available', (info) => {
|
autoUpdater.on('update-available', (info) => {
|
||||||
console.log('update-available', info)
|
console.log('update-available', info)
|
||||||
autoUpdater.prependOnceListener('download-progress', (progress) => {
|
})
|
||||||
// For now, we'll send the version to the loading toast start.
|
|
||||||
console.log('update-download-start', {
|
|
||||||
version: info.version,
|
|
||||||
})
|
|
||||||
mainWindow?.webContents.send('update-download-start', progress)
|
|
||||||
})
|
|
||||||
|
|
||||||
autoUpdater.on('download-progress', (progress) => {
|
autoUpdater.prependOnceListener('download-progress', (progress) => {
|
||||||
// TODO: in a future PR (https://github.com/KittyCAD/modeling-app/issues/3994)
|
// For now, we'll send the version to the loading toast start.
|
||||||
// send this data to mainWindow to show a progress bar for the download.
|
console.log('update-download-start', {
|
||||||
console.log('download-progress', progress)
|
version: '',
|
||||||
})
|
})
|
||||||
|
mainWindow?.webContents.send('update-download-start', progress)
|
||||||
|
})
|
||||||
|
|
||||||
|
autoUpdater.on('download-progress', (progress) => {
|
||||||
|
// TODO: in a future PR (https://github.com/KittyCAD/modeling-app/issues/3994)
|
||||||
|
// send this data to mainWindow to show a progress bar for the download.
|
||||||
|
console.log('download-progress', progress)
|
||||||
})
|
})
|
||||||
|
|
||||||
autoUpdater.on('update-downloaded', (info) => {
|
autoUpdater.on('update-downloaded', (info) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user