fix(RD): separate search and versions/info tasks

This allows us to check whether a search request is already on-going, in
which case we don't need to make another one (and shouldn't).

Signed-off-by: flow <flowlnlnln@gmail.com>
This commit is contained in:
flow
2022-12-20 17:14:17 -03:00
parent 38e20eb148
commit 563fe8d515
4 changed files with 49 additions and 15 deletions

View File

@ -353,8 +353,8 @@ void ResourcePage::openUrl(const QUrl& url)
searchEdit->setText(slug);
newPage->triggerSearch();
if (model->activeJob().isRunning())
connect(&model->activeJob(), &Task::finished, jump);
if (model->hasActiveSearchJob())
connect(model->activeSearchJob().get(), &Task::finished, jump);
else
jump();