Extract cloud download thread launcher

This commit is contained in:
2026-06-15 21:27:15 +02:00
parent f3abc1354f
commit 88018f6c69
4 changed files with 55 additions and 4 deletions

View File

@@ -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: