Fix problems with changing auto check interval

This commit is contained in:
Guy Scharf 2020-07-05 10:58:25 -07:00
parent 70262fa425
commit 7e751a80f7
2 changed files with 8 additions and 5 deletions

View File

@ -605,14 +605,16 @@ bool MainWindow::OpenProfile(QString profileName, bool skippassword)
delete progress;
qDebug() << "Finished opening Profile";
updateChecker->showMessage();
if (updateChecker != nullptr)
updateChecker->showMessage();
return true;
}
void MainWindow::CloseProfile()
{
updateChecker->showMessage();
if (updateChecker != nullptr)
updateChecker->showMessage();
if (daily) {
daily->Unload();

View File

@ -220,23 +220,24 @@ PreferencesDialog::PreferencesDialog(QWidget *parent, Profile *_profile) :
ui->autoLaunchImporter->setChecked(AppSetting->autoLaunchImport());
#ifndef NO_CHECKUPDATES
ui->updateCheckEvery->setValue(AppSetting->updateCheckFrequency());
ui->allowEarlyUpdates->setChecked(AppSetting->allowEarlyUpdates());
ui->test_invite->setVisible(false);
if (!getVersion().IsReleaseVersion()) {
// Test version
ui->automaticallyCheckUpdates->setVisible(false);
ui->allowEarlyUpdates->setVisible(false);
ui->updateCheckEvery->setMaximum(min(7,AppSetting->updateCheckFrequency()));
ui->updateCheckEvery->setMaximum(7);
}
else {
// Release version
ui->updateCheckEvery->setMaximum(min(90,AppSetting->updateCheckFrequency()));
ui->updateCheckEvery->setMaximum(90);
ui->always_look_for_updates->setVisible(false);
if (!AppSetting->allowEarlyUpdates()) {
ui->test_invite->setVisible(true);
ui->allowEarlyUpdates->setVisible(false);
}
}
ui->allowEarlyUpdates->setChecked(AppSetting->allowEarlyUpdates());
#else
ui->automaticallyCheckUpdates_GroupBox->setVisible(false);
#endif