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:
parent
9d903175ab
commit
44bf0315ad
3 changed files with 30 additions and 3 deletions
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue