summaryrefslogtreecommitdiff
path: root/src/modlist.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modlist.cpp')
-rw-r--r--src/modlist.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/modlist.cpp b/src/modlist.cpp
index c252d73b..55241492 100644
--- a/src/modlist.cpp
+++ b/src/modlist.cpp
@@ -465,9 +465,13 @@ QVariant ModList::data(const QModelIndex &modelIndex, int role) const
}
if (modInfo->getNexusID() > 0) {
if (!modInfo->canBeUpdated()) {
- text += "<br>" + tr("This mod was last checked on %1. It will be available to check after %2.")
+ qint64 remains = QDateTime::currentDateTimeUtc().secsTo(modInfo->getExpires());
+ qint64 hours = remains / 3600;
+ qint64 minutes = (remains % 3600) / 60;
+ QString remainsStr(tr("%1 hours and %2 minutes").arg(hours).arg(minutes));
+ text += "<br>" + tr("This mod was last checked on %1. It will be available to check in %2.")
.arg(modInfo->getLastNexusUpdate().toLocalTime().toString(Qt::DefaultLocaleShortDate))
- .arg(modInfo->getExpires().toLocalTime().time().toString(Qt::DefaultLocaleShortDate));
+ .arg(remainsStr);
} else {
text += "<br>" + tr("This mod is eligible for an update check.");
text += "<br>" + tr("It was last checked on %1").arg(modInfo->getLastNexusUpdate().toLocalTime().toString(Qt::DefaultLocaleShortDate));