electron-progressbar
electron-progressbar copied to clipboard
Closing progressBar window does not clear application progress bar
Am I correct that the proper way to trigger the .on('aborted')
event is to allow the ProgressBar to be closable, like this?
const progressBar = new ProgressBar(
{
text: 'Something is happening...',
browserWindow: { closable: true }, // <-- this makes it closable
closeOnComplete: true,
}
)
However, when the ProgressBar gets closed on MacOS, the application progress bar (shown in the Taskbar - what MacOS calls the "Dock") shows the progress stuck in the same state it was when the ProgressBar window was closed. I haven't tested on Windows, so I don't know if the problem exists there too.
I've tried this, but it doesn't seem to work:
progressBar.on('abort', () => {
progressBar.setCompleted()
})
Am I missing something? If not, I can look into submitting a pull request to fix.