Browse Source

Apply "Hide zero values" to "Time Active" column

adaptive-webui-19844
Chocobo1 4 years ago
parent
commit
afa2fc0ba9
No known key found for this signature in database
GPG Key ID: 210D9C873253A68C
  1. 6
      src/gui/transferlistmodel.cpp

6
src/gui/transferlistmodel.cpp

@ -302,10 +302,14 @@ QString TransferListModel::displayValue(const BitTorrent::Torrent *torrent, cons @@ -302,10 +302,14 @@ QString TransferListModel::displayValue(const BitTorrent::Torrent *torrent, cons
: Utils::Misc::userFriendlyDuration(value);
};
const auto timeElapsedString = [](const qint64 elapsedTime, const qint64 seedingTime) -> QString
const auto timeElapsedString = [hideValues](const qint64 elapsedTime, const qint64 seedingTime) -> QString
{
if (seedingTime <= 0)
{
if (hideValues && (elapsedTime == 0))
return {};
return Utils::Misc::userFriendlyDuration(elapsedTime);
}
return tr("%1 (seeded for %2)", "e.g. 4m39s (seeded for 3m10s)")
.arg(Utils::Misc::userFriendlyDuration(elapsedTime)

Loading…
Cancel
Save