mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-25 23:55:38 +00:00
Make ScraperSearchHandle::update() non-blocking and ScraperSearchComponent::search() show the busy animation.
This commit is contained in:
parent
7984a00a6e
commit
d2eb7079e1
|
@ -205,6 +205,8 @@ void ScraperSearchComponent::updateViewStyle()
|
||||||
|
|
||||||
void ScraperSearchComponent::search(const ScraperSearchParams& params)
|
void ScraperSearchComponent::search(const ScraperSearchParams& params)
|
||||||
{
|
{
|
||||||
|
mBlockAccept = true;
|
||||||
|
|
||||||
mResultList->clear();
|
mResultList->clear();
|
||||||
mScraperResults.clear();
|
mScraperResults.clear();
|
||||||
mThumbnailReq.reset();
|
mThumbnailReq.reset();
|
||||||
|
|
|
@ -41,7 +41,7 @@ void ScraperSearchHandle::update()
|
||||||
if(mStatus == ASYNC_DONE)
|
if(mStatus == ASYNC_DONE)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
while(!mRequestQueue.empty())
|
if(!mRequestQueue.empty())
|
||||||
{
|
{
|
||||||
auto& req = mRequestQueue.front();
|
auto& req = mRequestQueue.front();
|
||||||
AsyncHandleStatus status = req->status();
|
AsyncHandleStatus status = req->status();
|
||||||
|
@ -62,7 +62,6 @@ void ScraperSearchHandle::update()
|
||||||
if(status == ASYNC_DONE)
|
if(status == ASYNC_DONE)
|
||||||
{
|
{
|
||||||
mRequestQueue.pop();
|
mRequestQueue.pop();
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// status == ASYNC_IN_PROGRESS
|
// status == ASYNC_IN_PROGRESS
|
||||||
|
|
Loading…
Reference in a new issue