Qt: Prevent multiple update download button clicks

This commit is contained in:
Stenzek 2024-11-27 18:17:16 +10:00
parent 97700b85de
commit a879c11c34
No known key found for this signature in database
1 changed files with 5 additions and 0 deletions

View File

@ -511,6 +511,11 @@ void AutoUpdaterDialog::getChangesComplete(s32 status_code, std::vector<u8> resp
void AutoUpdaterDialog::downloadUpdateClicked()
{
#ifdef AUTO_UPDATER_SUPPORTED
// Prevent multiple clicks of the button.
if (!m_ui.downloadAndInstall->isEnabled())
return;
m_ui.downloadAndInstall->setEnabled(false);
m_display_messages = true;
std::optional<bool> download_result;