mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-20 15:37:26 -06:00
WebUI: Don't update UI if the page is hidden
Currently, there is unnecessary CPU/network usage by the web UI when it's running in the background, this PR prevents it from refreshing in the background. Closes #22565. PR #22567.
This commit is contained in:
@@ -43,6 +43,8 @@ window.qBittorrent.PropPeers ??= (() => {
|
||||
let show_flags = true;
|
||||
|
||||
const loadTorrentPeersData = () => {
|
||||
if (document.hidden)
|
||||
return;
|
||||
if ($("propPeers").classList.contains("invisible")
|
||||
|| $("propertiesPanel_collapseToggle").classList.contains("panel-expand")) {
|
||||
syncTorrentPeersLastResponseId = 0;
|
||||
|
||||
Reference in New Issue
Block a user