Make sure to not repeat the update channels list when loading the settings for a second account.

When adding a new account, the combo box would list each update channels twice.

Signed-off-by: Camila Ayres <hello@camilasan.com>
This commit is contained in:
Camila Ayres 2024-08-06 12:37:43 +02:00 committed by Matthieu Gallien
parent 1a46b2e125
commit 2ab94d54d8

View file

@ -282,6 +282,7 @@ void GeneralSettings::loadMiscSettings()
#if defined(BUILD_UPDATER)
const auto validUpdateChannels = cfgFile.validUpdateChannels();
_ui->updateChannel->clear();
_ui->updateChannel->addItems(validUpdateChannels);
const auto currentUpdateChannelIndex = validUpdateChannels.indexOf(cfgFile.currentUpdateChannel());
_ui->updateChannel->setCurrentIndex(currentUpdateChannelIndex != -1? currentUpdateChannelIndex : 0);