Extract cloud download thread launcher
This commit is contained in:
@@ -176,6 +176,15 @@ void execute_cloud_download_thread(
|
||||
pp::panopainter::close_legacy_dialog_node(*m);
|
||||
}
|
||||
|
||||
void launch_cloud_download_thread(
|
||||
App& app,
|
||||
const pp::app::CloudDownloadRequest& request)
|
||||
{
|
||||
std::thread([app = &app, request] {
|
||||
execute_cloud_download_thread(*app, request);
|
||||
}).detach();
|
||||
}
|
||||
|
||||
void execute_cloud_publish_worker(App& app, bool save_before_upload)
|
||||
{
|
||||
BT_SetTerminate();
|
||||
@@ -318,10 +327,7 @@ public:
|
||||
|
||||
void start_download(const pp::app::CloudDownloadRequest& request) override
|
||||
{
|
||||
auto* app = &app_;
|
||||
std::thread([app, request] {
|
||||
execute_cloud_download_thread(*app, request);
|
||||
}).detach();
|
||||
launch_cloud_download_thread(app_, request);
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user