mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-06-29 09:59:59 +03:00
refactor: make mod metadata presence (or lack of) easier to find out
This commit is contained in:
parent
a99858c64d
commit
96e36f0604
6 changed files with 49 additions and 13 deletions
|
|
@ -19,8 +19,13 @@ void ModFolderLoadTask::run()
|
|||
m_mods_dir.refresh();
|
||||
for (auto entry : m_mods_dir.entryInfoList()) {
|
||||
Mod mod(entry);
|
||||
if (!m_result->mods.contains(mod.internal_id()))
|
||||
if(m_result->mods.contains(mod.internal_id())){
|
||||
m_result->mods[mod.internal_id()].setStatus(ModStatus::Installed);
|
||||
}
|
||||
else {
|
||||
m_result->mods[mod.internal_id()] = mod;
|
||||
m_result->mods[mod.internal_id()].setStatus(ModStatus::NoMetadata);
|
||||
}
|
||||
}
|
||||
|
||||
emit succeeded();
|
||||
|
|
@ -42,6 +47,7 @@ void ModFolderLoadTask::getFromMetadata()
|
|||
}
|
||||
|
||||
Mod mod(m_mods_dir, metadata);
|
||||
mod.setStatus(ModStatus::NotInstalled);
|
||||
m_result->mods[mod.internal_id()] = mod;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue