mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-11-28 13:28:50 +03:00
Apply "Hide zero values" to "Time Active" column
This commit is contained in:
parent
6a45919b25
commit
afa2fc0ba9
1 changed files with 5 additions and 1 deletions
|
@ -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…
Reference in a new issue