feat(components) recomend the correct lwjgl version for the minecraft version

Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
This commit is contained in:
Rachel Powers 2024-06-20 15:55:58 -07:00
parent 9d903175ab
commit 44bf0315ad
No known key found for this signature in database
GPG key ID: E10E321EB160949B
3 changed files with 30 additions and 3 deletions

View file

@ -99,7 +99,7 @@ QVariant VersionList::data(const QModelIndex& index, int role) const
case VersionPtrRole:
return QVariant::fromValue(version);
case RecommendedRole:
return version->isRecommended();
return version->isRecommended() || m_externalRecommendsVersions.contains(version->version());
// FIXME: this should be determined in whatever view/proxy is used...
// case LatestRole: return version == getLatestStable();
default:
@ -179,6 +179,16 @@ void VersionList::parse(const QJsonObject& obj)
parseVersionList(obj, this);
}
void VersionList::addExternalRecomends(const QVector<QString>& recomends)
{
m_externalRecommendsVersions.append(recomends);
}
void VersionList::clearExternalRecomends()
{
m_externalRecommendsVersions.clear();
}
// FIXME: this is dumb, we have 'recommended' as part of the metadata already...
static const Meta::Version::Ptr& getBetterVersion(const Meta::Version::Ptr& a, const Meta::Version::Ptr& b)
{