mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-06 13:11:25 -07:00
WebUI: avoid excessive checking
This commit is contained in:
parent
6b52a04ff1
commit
062904c2bd
2 changed files with 4 additions and 4 deletions
|
@ -88,7 +88,7 @@ window.qBittorrent.PiecesBar ??= (() => {
|
||||||
if (vals.width > 0)
|
if (vals.width > 0)
|
||||||
obj.setPieces(vals.pieces);
|
obj.setPieces(vals.pieces);
|
||||||
else
|
else
|
||||||
setTimeout(() => { checkForParent(obj.id); }, 1);
|
setTimeout(() => { checkForParent(obj.id); });
|
||||||
|
|
||||||
return obj;
|
return obj;
|
||||||
}
|
}
|
||||||
|
@ -258,7 +258,7 @@ window.qBittorrent.PiecesBar ??= (() => {
|
||||||
if (!obj)
|
if (!obj)
|
||||||
return;
|
return;
|
||||||
if (!obj.parentNode)
|
if (!obj.parentNode)
|
||||||
return setTimeout(() => { checkForParent(id); }, 1);
|
return setTimeout(() => { checkForParent(id); }, 100);
|
||||||
|
|
||||||
obj.refresh();
|
obj.refresh();
|
||||||
}
|
}
|
||||||
|
|
|
@ -104,7 +104,7 @@ window.qBittorrent.ProgressBar ??= (() => {
|
||||||
if (vals.width)
|
if (vals.width)
|
||||||
obj.setValue(vals.value);
|
obj.setValue(vals.value);
|
||||||
else
|
else
|
||||||
setTimeout('ProgressBar_checkForParent("' + obj.id + '")', 1);
|
setTimeout('ProgressBar_checkForParent("' + obj.id + '")');
|
||||||
return obj;
|
return obj;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -144,7 +144,7 @@ window.qBittorrent.ProgressBar ??= (() => {
|
||||||
if (!obj)
|
if (!obj)
|
||||||
return;
|
return;
|
||||||
if (!obj.parentNode)
|
if (!obj.parentNode)
|
||||||
return setTimeout('ProgressBar_checkForParent("' + id + '")', 1);
|
return setTimeout('ProgressBar_checkForParent("' + id + '")', 100);
|
||||||
obj.setStyle("width", "100%");
|
obj.setStyle("width", "100%");
|
||||||
const w = obj.offsetWidth;
|
const w = obj.offsetWidth;
|
||||||
obj.vals.dark.setStyle("width", w);
|
obj.vals.dark.setStyle("width", w);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue