mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-07-05 21:06:58 +03:00
removed some duplicate code
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
parent
ab3bfb0f74
commit
29cff14fd6
52 changed files with 928 additions and 2318 deletions
|
|
@ -12,8 +12,8 @@
|
|||
static std::list<Version> s_availableVersions = {};
|
||||
|
||||
namespace ResourceDownload {
|
||||
TexturePackResourceModel::TexturePackResourceModel(BaseInstance const& inst, ResourceAPI* api)
|
||||
: ResourcePackResourceModel(inst, api), m_version_list(APPLICATION->metadataIndex()->get("net.minecraft"))
|
||||
TexturePackResourceModel::TexturePackResourceModel(BaseInstance const& inst, ResourceAPI* api, QString debugName, QString metaEntryBase)
|
||||
: ResourcePackResourceModel(inst, api, debugName, metaEntryBase), m_version_list(APPLICATION->metadataIndex()->get("net.minecraft"))
|
||||
{
|
||||
if (!m_version_list->isLoaded()) {
|
||||
qDebug() << "Loading version list...";
|
||||
|
|
@ -73,6 +73,7 @@ ResourceAPI::SearchArgs TexturePackResourceModel::createSearchArguments()
|
|||
ResourceAPI::VersionSearchArgs TexturePackResourceModel::createVersionsArguments(const QModelIndex& entry)
|
||||
{
|
||||
auto args = ResourcePackResourceModel::createVersionsArguments(entry);
|
||||
args.resourceType = ModPlatform::ResourceType::TexturePack;
|
||||
if (!m_version_list->isLoaded()) {
|
||||
qCritical() << "The version list could not be loaded. Falling back to showing all entries.";
|
||||
return args;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue