Fixed download bugs

This commit is contained in:
Geomitron
2020-05-10 13:53:54 -04:00
parent 1cfb5f4e93
commit a81fddea3b
5 changed files with 10 additions and 8 deletions

View File

@@ -46,7 +46,7 @@ export class DownloadService {
}
onDownloadUpdated(callback: (download: DownloadProgress) => void) {
const debouncedCallback = _.throttle(callback, 30)
const debouncedCallback = _.throttle(callback, 30, { trailing: false })
this.downloadUpdatedEmitter.subscribe((download: DownloadProgress) => {
if (download.type == 'fastUpdate') { // 'good' updates can happen so frequently that the UI doesn't update correctly
debouncedCallback(download)