Skip to content

Commit

Permalink
Hide zero and infinity values in peer list only when that setting is …
Browse files Browse the repository at this point in the history
…set to `Always`

PR #22205.
Closes #21998.
  • Loading branch information
thalieht authored Jan 27, 2025
1 parent 3978137 commit bb4a668
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/gui/properties/peerlistwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,8 @@ void PeerListWidget::loadPeers(const BitTorrent::Torrent *torrent)
for (auto i = m_peerItems.cbegin(); i != m_peerItems.cend(); ++i)
existingPeers.insert(i.key());

const bool hideZeroValues = Preferences::instance()->getHideZeroValues();
const Preferences *pref = Preferences::instance();
const bool hideZeroValues = (pref->getHideZeroValues() && (pref->getHideZeroComboValues() == 0));
for (const BitTorrent::PeerInfo &peer : peers)
{
const PeerEndpoint peerEndpoint {peer.address(), peer.connectionType()};
Expand Down

0 comments on commit bb4a668

Please sign in to comment.