More download bugfixes

This commit is contained in:
Geomitron
2020-05-10 15:46:11 -04:00
parent a81fddea3b
commit 8a4620d771
10 changed files with 74 additions and 42 deletions

View File

@@ -29,10 +29,11 @@ class DownloadHandler implements IPCEmitHandler<'download'> {
}
}
private retryDownload(data: Download) { // TODO: cause this to send a GUI update that says waiting for download to finish...
private retryDownload(data: Download) {
const index = this.retryWaiting.findIndex(download => download.versionID == data.versionID)
if (index != -1) {
const retryDownload = this.retryWaiting.splice(index, 1)[0]
retryDownload.displayRetrying()
if (this.currentDownload == undefined) {
this.currentDownload = retryDownload
retryDownload.retry()