Skip to content

Commit 20b3e9d

Browse files
committed
Fix Alert Window showing up before download completes
1 parent bbcfd6a commit 20b3e9d

1 file changed

Lines changed: 10 additions & 7 deletions

File tree

Source/AutoUpdater.cpp

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -466,17 +466,20 @@ void LatestVersionCheckerAndUpdater::downloadAndInstall (const Asset& asset, con
466466
else
467467
#endif
468468
{
469-
AlertWindow::showMessageBoxAsync (AlertWindow::InfoIcon,
470-
"Download successful!",
471-
"Please extract the zip file located at: \n" +
472-
targetFile.getFullPathName().quoted() +
473-
"\nto your desired location and then run the updated version from there. "
474-
"You can also overwrite the current installation after quitting the current instance.");
469+
String msgBoxString = "Please extract the zip file located at: \n" +
470+
targetFile.getFullPathName().quoted() +
471+
"\nto your desired location and then run the updated version from there. "
472+
"You can also overwrite the current installation after quitting the current instance.";
475473

476474
downloader.reset (new DownloadThread (asset, targetFile,
477-
[this]
475+
[this, msgBoxString]
478476
{
479477
downloader.reset();
478+
479+
AlertWindow::showMessageBoxAsync
480+
(AlertWindow::InfoIcon,
481+
"Download successful!",
482+
msgBoxString);
480483

481484
}));
482485
}

0 commit comments

Comments
 (0)