refactor: use function cb instead of class cb in getModInfo

I've discovered functional programming :^)
This makes this route more fit for general use.

Signed-off-by: flow <flowlnlnln@gmail.com>
This commit is contained in:
flow
2022-07-18 19:15:02 -03:00
parent 158b7fd166
commit 74c6c5cfbc
4 changed files with 8 additions and 7 deletions

View File

@ -102,7 +102,8 @@ void ListModel::performPaginatedSearch()
void ListModel::requestModInfo(ModPlatform::IndexedPack& current)
{
m_parent->apiProvider()->getModInfo(this, current);
m_parent->apiProvider()->getModInfo(
current, [this](QJsonDocument& doc, ModPlatform::IndexedPack& pack) { infoRequestFinished(doc, pack); });
}
void ListModel::refresh()