From 5173a56ebd10c3366ee849ef4460e8c4cc915684 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= Date: Tue, 31 May 2022 06:45:28 +0200 Subject: [PATCH] Fix DHT/PeX/LSD status when it is globally disabled Global status takes precedence over specific torrent private status. PR #17126. --- src/gui/properties/trackerlistwidget.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/gui/properties/trackerlistwidget.cpp b/src/gui/properties/trackerlistwidget.cpp index f2a80dcaf..c77fa6331 100644 --- a/src/gui/properties/trackerlistwidget.cpp +++ b/src/gui/properties/trackerlistwidget.cpp @@ -279,26 +279,26 @@ void TrackerListWidget::loadStickyItems(const BitTorrent::Torrent *torrent) const auto *session = BitTorrent::Session::instance(); // load DHT information - if (torrent->isPrivate() || torrent->isDHTDisabled()) - m_DHTItem->setText(COL_STATUS, torrentDisabled); - else if (!session->isDHTEnabled()) + if (!session->isDHTEnabled()) m_DHTItem->setText(COL_STATUS, disabled); + else if (torrent->isPrivate() || torrent->isDHTDisabled()) + m_DHTItem->setText(COL_STATUS, torrentDisabled); else m_DHTItem->setText(COL_STATUS, working); // Load PeX Information - if (torrent->isPrivate() || torrent->isPEXDisabled()) - m_PEXItem->setText(COL_STATUS, torrentDisabled); - else if (!session->isPeXEnabled()) + if (!session->isPeXEnabled()) m_PEXItem->setText(COL_STATUS, disabled); + else if (torrent->isPrivate() || torrent->isPEXDisabled()) + m_PEXItem->setText(COL_STATUS, torrentDisabled); else m_PEXItem->setText(COL_STATUS, working); // Load LSD Information - if (torrent->isPrivate() || torrent->isLSDDisabled()) - m_LSDItem->setText(COL_STATUS, torrentDisabled); - else if (!session->isLSDEnabled()) + if (!session->isLSDEnabled()) m_LSDItem->setText(COL_STATUS, disabled); + else if (torrent->isPrivate() || torrent->isLSDDisabled()) + m_LSDItem->setText(COL_STATUS, torrentDisabled); else m_LSDItem->setText(COL_STATUS, working);