Fix dense call to setItemDownloadPercentage freezes app (#4979)

This commit is contained in:
windingwind 2025-01-11 09:17:56 +01:00 • committed by GitHub
parent 459d00448a
commit 524660e10b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -64,7 +64,7 @@ Zotero.Sync.Storage = new function () {
* @param {String} libraryKey
* @param {Number|NULL}
*/
this.setItemDownloadPercentage = function (libraryKey, percentage) {
this.setItemDownloadPercentage = Zotero.Utilities.throttle(function (libraryKey, percentage) {
Zotero.debug("Setting image download percentage to " + percentage
+ " for item " + libraryKey);
@ -93,7 +93,7 @@ Zotero.Sync.Storage = new function () {
}
Zotero.Notifier.trigger('redraw', 'item', parentItem.id, { column: "hasAttachment" });
}
}
}, 100);
function error(e) {