From 6679a690a2e1e244c0afdeaa359f596335e947a2 Mon Sep 17 00:00:00 2001 From: Fleeym <61891787+Fleeym@users.noreply.github.com> Date: Wed, 13 Nov 2024 19:48:47 +0200 Subject: [PATCH] fix(ModItem): hide outdated label when updating --- loader/src/ui/mods/list/ModItem.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/loader/src/ui/mods/list/ModItem.cpp b/loader/src/ui/mods/list/ModItem.cpp index c257c3cf..d12f64e0 100644 --- a/loader/src/ui/mods/list/ModItem.cpp +++ b/loader/src/ui/mods/list/ModItem.cpp @@ -330,9 +330,10 @@ void ModItem::updateState() { auto wantsRestart = m_source.wantsRestart(); auto download = server::ModDownloadManager::get()->getDownload(m_source.getID()); + bool isDownloading = download && download->isActive(); // If there is an active download ongoing, show that in place of developer name - if (download && download->isActive()) { + if (isDownloading) { m_updateBtn->setVisible(false); m_restartRequiredLabel->setVisible(false); m_developers->setVisible(false); @@ -431,7 +432,7 @@ void ModItem::updateState() { m_bg->setColor("mod-list-errors-found"_cc3b); m_bg->setOpacity(isGeodeTheme() ? 25 : 90); } - if (!wantsRestart && targetsOutdated) { + if (!wantsRestart && targetsOutdated && !isDownloading) { LoadProblem problem = targetsOutdated.value(); m_bg->setColor("mod-list-outdated-label"_cc3b); m_bg->setOpacity(isGeodeTheme() ? 25 : 90);