WebUI: avoid excessive checking

This commit is contained in:
Chocobo1
2024-07-23 16:42:17 +08:00
parent 6b52a04ff1
commit 062904c2bd
2 changed files with 4 additions and 4 deletions

View File

@@ -88,7 +88,7 @@ window.qBittorrent.PiecesBar ??= (() => {
if (vals.width > 0)
obj.setPieces(vals.pieces);
else
setTimeout(() => { checkForParent(obj.id); }, 1);
setTimeout(() => { checkForParent(obj.id); });
return obj;
}
@@ -258,7 +258,7 @@ window.qBittorrent.PiecesBar ??= (() => {
if (!obj)
return;
if (!obj.parentNode)
return setTimeout(() => { checkForParent(id); }, 1);
return setTimeout(() => { checkForParent(id); }, 100);
obj.refresh();
}