remove all async_start/end calls
This commit is contained in:
@@ -55,7 +55,6 @@ void NodeDialogCloud::load_thumbs_thread()
|
||||
std::string res;
|
||||
if (curl)
|
||||
{
|
||||
async_start();
|
||||
auto* align = container->add_child<Node>();
|
||||
align->SetWidthP(100.f);
|
||||
align->SetHeightP(100.f);
|
||||
@@ -64,8 +63,6 @@ void NodeDialogCloud::load_thumbs_thread()
|
||||
auto* text = align->add_child<NodeText>();
|
||||
text->set_font(kFont::Arial_30);
|
||||
text->set_text("Connecting to the server...");
|
||||
async_update();
|
||||
async_end();
|
||||
|
||||
curl_easy_setopt(curl, CURLOPT_WRITEDATA, &res);
|
||||
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, curl_data_handler);
|
||||
@@ -78,16 +75,11 @@ void NodeDialogCloud::load_thumbs_thread()
|
||||
if (err != CURLE_OK)
|
||||
{
|
||||
LOG("connection error: %d", err);
|
||||
async_start();
|
||||
text->set_text("Could not connect to the server");
|
||||
async_update();
|
||||
async_end();
|
||||
return;
|
||||
}
|
||||
|
||||
async_start();
|
||||
align->destroy();
|
||||
async_end();
|
||||
|
||||
LOG("CLOUD LIST: %s", res.c_str());
|
||||
|
||||
@@ -95,7 +87,6 @@ void NodeDialogCloud::load_thumbs_thread()
|
||||
std::vector<NodeDialogCloudItem*> nodes;
|
||||
|
||||
// create slots with name
|
||||
App::I.async_start();
|
||||
for (const auto& n : names)
|
||||
{
|
||||
auto node = new NodeDialogCloudItem;
|
||||
@@ -117,8 +108,6 @@ void NodeDialogCloud::load_thumbs_thread()
|
||||
};
|
||||
nodes.push_back(node);
|
||||
}
|
||||
App::I.async_update();
|
||||
App::I.async_end();
|
||||
|
||||
// load the icons
|
||||
for (int i = 0; i < names.size(); i++)
|
||||
@@ -149,12 +138,9 @@ void NodeDialogCloud::load_thumbs_thread()
|
||||
thumb.create(width, height);
|
||||
thumb.copy_from((uint8_t*)rgb.data());
|
||||
|
||||
App::I.async_start();
|
||||
auto image_tex = node->find<NodeImageTexture>("thumb-tex");
|
||||
image_tex->tex.destroy();
|
||||
image_tex->tex.create(thumb);
|
||||
App::I.async_update();
|
||||
App::I.async_end();
|
||||
}
|
||||
curl_easy_cleanup(curl);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user