From 73418ec61646673ffa90a2b5debde4e25e020b4b Mon Sep 17 00:00:00 2001 From: AL <26797547+Al12rs@users.noreply.github.com> Date: Thu, 11 Feb 2021 16:29:32 +0100 Subject: Hopefully fix update filter not showing new mod updates. Notify all the mods that have had their info checked, not just the ones that have been found with an update. This is because Mo2 also shows mods that have had their files deleted or moved to Old as updateAvailable, in which case there is no update but the filter still needs to be notified to include the mod. --- src/mainwindow.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/mainwindow.cpp') diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 713037e9..762cf02e 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -2979,9 +2979,7 @@ void MainWindow::nxmModInfoAvailable(QString gameName, int modID, QVariant userD mod->setNexusLastModified(QDateTime::fromSecsSinceEpoch(result["updated_timestamp"].toInt(), Qt::UTC)); mod->saveMeta(); - if (foundUpdate) { - m_OrganizerCore.modList()->notifyChange(ModInfo::getIndex(mod->name())); - } + m_OrganizerCore.modList()->notifyChange(ModInfo::getIndex(mod->name())); } } -- cgit v1.3.1 From eba98e8469a04862d5c2cbac5903e653516c30a6 Mon Sep 17 00:00:00 2001 From: AL <26797547+Al12rs@users.noreply.github.com> Date: Thu, 11 Feb 2021 16:34:43 +0100 Subject: Remove unused variable --- src/mainwindow.cpp | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/mainwindow.cpp') diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 762cf02e..0fabd0dc 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -2951,7 +2951,6 @@ void MainWindow::nxmModInfoAvailable(QString gameName, int modID, QVariant userD } std::vector modsList = ModInfo::getByModID(gameNameReal, modID); for (auto mod : modsList) { - bool foundUpdate = false; QDateTime now = QDateTime::currentDateTimeUtc(); QDateTime updateTarget = mod->getExpires(); if (now >= updateTarget) { @@ -2959,7 +2958,6 @@ void MainWindow::nxmModInfoAvailable(QString gameName, int modID, QVariant userD // with an older version than the main mod version. if (mod->getNexusFileStatus() != 3 && mod->getNexusFileStatus() != 5) { mod->setNewestVersion(result["version"].toString()); - foundUpdate = true; } // update the LastNexusUpdate time in any case since we did perform the check. mod->setLastNexusUpdate(QDateTime::currentDateTimeUtc()); -- cgit v1.3.1