1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-30 15:38:12 +00:00

ChanViewer: Add a status bar to show loading status

Also update the window title with the current board after loading. :^)
This commit is contained in:
Andreas Kling 2019-08-05 18:54:44 +02:00
parent fdcaf2d2b5
commit cd08c8e1bf
3 changed files with 30 additions and 2 deletions

View file

@ -32,12 +32,18 @@ void ThreadCatalogModel::update()
auto* job = request.schedule();
if (on_load_started)
on_load_started();
job->on_finish = [job, this](bool success) {
auto* response = job->response();
dbg() << "Catalog download finished, success=" << success << ", response=" << response;
if (!success)
if (!success) {
if (on_load_finished)
on_load_finished(false);
return;
}
dbg() << "Catalog payload size: " << response->payload().size();
@ -61,6 +67,9 @@ void ThreadCatalogModel::update()
}
did_update();
if (on_load_finished)
on_load_finished(true);
};
}