Merge branch 'develop' of https://github.com/PrismLauncher/PrismLauncher into fix_retry_dialog
This commit is contained in:
commit
c04031ff00
107 changed files with 2185 additions and 1047 deletions
|
@ -412,12 +412,17 @@ void ResourceModel::searchRequestSucceeded(QJsonDocument& doc)
|
|||
m_search_state = SearchState::CanFetchMore;
|
||||
}
|
||||
|
||||
QList<ModPlatform::IndexedPack::Ptr> filteredNewList;
|
||||
for (auto p : newList)
|
||||
if (checkFilters(p))
|
||||
filteredNewList << p;
|
||||
|
||||
// When you have a Qt build with assertions turned on, proceeding here will abort the application
|
||||
if (newList.size() == 0)
|
||||
if (filteredNewList.size() == 0)
|
||||
return;
|
||||
|
||||
beginInsertRows(QModelIndex(), m_packs.size(), m_packs.size() + newList.size() - 1);
|
||||
m_packs.append(newList);
|
||||
beginInsertRows(QModelIndex(), m_packs.size(), m_packs.size() + filteredNewList.size() - 1);
|
||||
m_packs.append(filteredNewList);
|
||||
endInsertRows();
|
||||
}
|
||||
|
||||
|
@ -560,4 +565,8 @@ void ResourceModel::removePack(const QString& rem)
|
|||
ver.is_currently_selected = false;
|
||||
}
|
||||
|
||||
bool ResourceModel::checkVersionFilters(const ModPlatform::IndexedVersion& v)
|
||||
{
|
||||
return (!optedOut(v));
|
||||
}
|
||||
} // namespace ResourceDownload
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue