removed extra if
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
parent
4036cecfc0
commit
8c607ae734
3 changed files with 19 additions and 31 deletions
|
@ -138,12 +138,8 @@ void ModpackListModel::performPaginatedSearch()
|
|||
if (!projectId.isEmpty()) {
|
||||
ResourceAPI::ProjectInfoCallbacks callbacks;
|
||||
|
||||
// Use defaults if no callbacks are set
|
||||
if (!callbacks.on_fail)
|
||||
callbacks.on_fail = [this](QString reason) { searchRequestFailed(reason); };
|
||||
|
||||
if (!callbacks.on_succeed)
|
||||
callbacks.on_succeed = [this](auto& doc, auto& pack) { searchRequestForOneSucceeded(doc); };
|
||||
callbacks.on_fail = [this](QString reason) { searchRequestFailed(reason); };
|
||||
callbacks.on_succeed = [this](auto& doc, auto& pack) { searchRequestForOneSucceeded(doc); };
|
||||
static const ModrinthAPI api;
|
||||
if (auto job = api.getProjectInfo({ projectId }, std::move(callbacks)); job) {
|
||||
jobPtr = job;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue