mirror of
https://github.com/geode-sdk/geode.git
synced 2024-11-22 07:27:59 -05:00
fix: don't show outdated if wantsRestart
This commit is contained in:
parent
df2528c8a5
commit
0b2fc66a89
1 changed files with 18 additions and 10 deletions
|
@ -434,17 +434,25 @@ void ModItem::updateState() {
|
||||||
LoadProblem problem = opt.value();
|
LoadProblem problem = opt.value();
|
||||||
m_bg->setColor("mod-list-outdated-label"_cc3b);
|
m_bg->setColor("mod-list-outdated-label"_cc3b);
|
||||||
m_bg->setOpacity(isGeodeTheme() ? 25 : 90);
|
m_bg->setOpacity(isGeodeTheme() ? 25 : 90);
|
||||||
std::string content;
|
if (!wantsRestart) {
|
||||||
if (
|
std::string content;
|
||||||
problem.type == LoadProblem::Type::UnsupportedGeodeVersion ||
|
if (
|
||||||
problem.type == LoadProblem::Type::NeedsNewerGeodeVersion
|
problem.type == LoadProblem::Type::UnsupportedGeodeVersion ||
|
||||||
) {
|
problem.type == LoadProblem::Type::NeedsNewerGeodeVersion
|
||||||
content = fmt::format("Outdated (Geode {})", m_source.getMetadata().getGeodeVersion().toNonVString());
|
) {
|
||||||
} else {
|
content = fmt::format(
|
||||||
content = fmt::format("Outdated (GD {})", m_source.getMetadata().getGameVersion().value_or("*"));
|
"Outdated (Geode {})",
|
||||||
|
m_source.getMetadata().getGeodeVersion().toNonVString()
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
content = fmt::format(
|
||||||
|
"Outdated (GD {})",
|
||||||
|
m_source.getMetadata().getGameVersion().value_or("*")
|
||||||
|
);
|
||||||
|
}
|
||||||
|
m_outdatedLabel->setString(content.c_str());
|
||||||
|
m_outdatedLabel->setVisible(true);
|
||||||
}
|
}
|
||||||
m_outdatedLabel->setString(content.c_str());
|
|
||||||
m_outdatedLabel->setVisible(true);
|
|
||||||
m_developers->setVisible(false);
|
m_developers->setVisible(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue