mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-18 06:28:03 -06:00
Apply "Hide zero values" to "Time Active" column
This commit is contained in:
committed by
sledgehammer999
parent
bf67ef21c6
commit
f38736729d
@@ -302,10 +302,14 @@ QString TransferListModel::displayValue(const BitTorrent::Torrent *torrent, cons
|
|||||||
: Utils::Misc::userFriendlyDuration(value);
|
: 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 (seedingTime <= 0)
|
||||||
|
{
|
||||||
|
if (hideValues && (elapsedTime == 0))
|
||||||
|
return {};
|
||||||
return Utils::Misc::userFriendlyDuration(elapsedTime);
|
return Utils::Misc::userFriendlyDuration(elapsedTime);
|
||||||
|
}
|
||||||
|
|
||||||
return tr("%1 (seeded for %2)", "e.g. 4m39s (seeded for 3m10s)")
|
return tr("%1 (seeded for %2)", "e.g. 4m39s (seeded for 3m10s)")
|
||||||
.arg(Utils::Misc::userFriendlyDuration(elapsedTime)
|
.arg(Utils::Misc::userFriendlyDuration(elapsedTime)
|
||||||
|
|||||||
Reference in New Issue
Block a user