Make ScraperSearchHandle::update() non-blocking and ScraperSearchComponent::search() show the busy animation.

This commit is contained in:
dirk-de-bugger 2017-05-25 19:56:06 +02:00
parent 7984a00a6e
commit d2eb7079e1
2 changed files with 3 additions and 2 deletions

View file

@ -205,6 +205,8 @@ void ScraperSearchComponent::updateViewStyle()
void ScraperSearchComponent::search(const ScraperSearchParams& params)
{
mBlockAccept = true;
mResultList->clear();
mScraperResults.clear();
mThumbnailReq.reset();

View file

@ -41,7 +41,7 @@ void ScraperSearchHandle::update()
if(mStatus == ASYNC_DONE)
return;
while(!mRequestQueue.empty())
if(!mRequestQueue.empty())
{
auto& req = mRequestQueue.front();
AsyncHandleStatus status = req->status();
@ -62,7 +62,6 @@ void ScraperSearchHandle::update()
if(status == ASYNC_DONE)
{
mRequestQueue.pop();
continue;
}
// status == ASYNC_IN_PROGRESS