From cd93ec3489f82d852639033bf232ae23a8d6fd8e Mon Sep 17 00:00:00 2001 From: Camila Ayres Date: Thu, 17 Oct 2024 19:53:59 +0200 Subject: [PATCH] Fix logic for initial load of update channels and priority for user with subscription. Signed-off-by: Camila Ayres --- src/gui/generalsettings.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gui/generalsettings.cpp b/src/gui/generalsettings.cpp index 1152342edeba6..57936b7182c88 100644 --- a/src/gui/generalsettings.cpp +++ b/src/gui/generalsettings.cpp @@ -293,8 +293,9 @@ void GeneralSettings::loadMiscSettings() #if defined(BUILD_UPDATER) void GeneralSettings::loadUpdateChannelsList() { ConfigFile cfgFile; - if (_currentUpdateChannelList != cfgFile.validUpdateChannels() && !cfgFile.serverHasValidSubscription()) { - _currentUpdateChannelList = cfgFile.validUpdateChannels(); + const auto validUpdateChannels = cfgFile.validUpdateChannels(); + if (_currentUpdateChannelList.isEmpty() || (_currentUpdateChannelList != validUpdateChannels && !cfgFile.serverHasValidSubscription())) { + _currentUpdateChannelList = validUpdateChannels; _ui->updateChannel->clear(); _ui->updateChannel->addItems(_currentUpdateChannelList); const auto currentUpdateChannelIndex = _currentUpdateChannelList.indexOf(cfgFile.currentUpdateChannel());