When I canceled the download by downloadItem.cancel()
:
Firstly, onCancel
triggered.
Secondly, onProgress
triggered with progress 0
and progress on dock icon is almost completed.
onStarted(item) {
item.on('updated', (event, state) => {
if (state === 'interrupted') {
item.cancel();
}
});
},
onProgress({ percent, transferredBytes, totalBytes }) {
console.log('progress', percent)
},
onCancel(item) {
console.log('canceled', item);
}
After onCancel
, no onProgress
triggered and the dock icon progress should be hidden.
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too