feat: cancel download (#137)

* feat: cancel download

* Fix: Cannot download differentially, fallback to full download: Error: cancelled

* Apply suggestion from @ViniciusFXavier

Co-authored-by: Vinícius Francisco Xavier <viniciusfranciscoxavier@gmail.com>

---------

Co-authored-by: Song <1667077010@qq.com>
Co-authored-by: Vinícius Francisco Xavier <viniciusfranciscoxavier@gmail.com>
This commit is contained in:
authored and GitHub committed 2026-05-17 14:25:37 +08:00
1 parent ab63dcdea5
commit 2907f09e58
2 files changed
+10 -2

No files matched your search

+1 -1
View File
@@ -17,7 +17,7 @@ const Update = () => {
onCancel?: () => void
onOk?: () => void
}>({
onCancel: () => setModalOpen(false),
onCancel: () => window.ipcRenderer.invoke('cancel-download').then(() => setModalOpen(false)),
onOk: () => window.ipcRenderer.invoke('start-download'),
})