Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Update channel UI enhancements #6873

Draft
wants to merge 12 commits into
base: master
Choose a base branch
from
Draft
Prev Previous commit
Next Next commit
List daily update channel in the general settings view.
Signed-off-by: Camila Ayres <hello@camilasan.com>
  • Loading branch information
camilasan committed Jun 26, 2024
commit d905401a35c406e5c02efde5e130a220c78a16d3
16 changes: 8 additions & 8 deletions src/gui/generalsettings.cpp
Original file line number Diff line number Diff line change
@@ -279,6 +279,14 @@ void GeneralSettings::loadMiscSettings()
_ui->stopExistingFolderNowBigSyncCheckBox->setChecked(_ui->existingFolderLimitCheckBox->isChecked() && cfgFile.stopSyncingExistingFoldersOverLimit());
_ui->newExternalStorage->setChecked(cfgFile.confirmExternalStorage());
_ui->monoIconsCheckBox->setChecked(cfgFile.monoIcons());

#if defined(BUILD_UPDATER)
auto validUpdateChannels = cfgFile.validUpdateChannels();
_ui->updateChannel->addItems(validUpdateChannels);
const auto currentUpdateChannelIndex = validUpdateChannels.indexOf(cfgFile.updateChannel());
_ui->updateChannel->setCurrentIndex(currentUpdateChannelIndex != -1? currentUpdateChannelIndex : 0);
connect(_ui->updateChannel, &QComboBox::currentTextChanged, this, &GeneralSettings::slotUpdateChannelChanged);
#endif
}

#if defined(BUILD_UPDATER)
@@ -292,9 +300,6 @@ void GeneralSettings::slotUpdateInfo()
return;
}

const auto validUpdateChannels = config.validUpdateChannels();
_ui->updateChannel->addItems(validUpdateChannels);

if (updater) {
connect(_ui->updateButton,
&QAbstractButton::clicked,
@@ -338,11 +343,6 @@ void GeneralSettings::slotUpdateInfo()
_ui->updateButton->setEnabled(enableUpdateButton);
}
#endif

const auto currentUpdateChannelIndex = validUpdateChannels.indexOf(config.updateChannel());
_ui->updateChannel->setCurrentIndex(currentUpdateChannelIndex != -1? currentUpdateChannelIndex : 0);
connect(_ui->updateChannel, &QComboBox::currentTextChanged,
this, &GeneralSettings::slotUpdateChannelChanged, Qt::UniqueConnection);
}

void GeneralSettings::slotUpdateChannelChanged()