Flatten autoupdater hooks

This commit is contained in:
Pierre Jacquier
2024-10-02 07:31:20 -04:00
parent df8d3740b6
commit 1a7d587af8
2 changed files with 13 additions and 11 deletions

View File

@ -5,6 +5,7 @@ on:
push: push:
branches: branches:
- main - main
- pierremtb/update-download-progress-flatten
release: release:
types: [published] types: [published]
schedule: schedule:

View File

@ -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) => {