mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-03 07:07:23 +00:00
LibCore: Convert CHttpJob to ObjectPtr
This commit is contained in:
@@ -29,13 +29,13 @@ void ThreadCatalogModel::update()
|
||||
CHttpRequest request;
|
||||
request.set_url(String::format("http://a.4cdn.org/%s/catalog.json", m_board.characters()));
|
||||
|
||||
auto* job = request.schedule();
|
||||
m_pending_job = request.schedule();
|
||||
|
||||
if (on_load_started)
|
||||
on_load_started();
|
||||
|
||||
job->on_finish = [job, this](bool success) {
|
||||
auto* response = job->response();
|
||||
m_pending_job->on_finish = [this](bool success) {
|
||||
auto* response = m_pending_job->response();
|
||||
dbg() << "Catalog download finished, success=" << success << ", response=" << response;
|
||||
|
||||
if (!success) {
|
||||
|
||||
Reference in New Issue
Block a user