From 1921df558b78fd7ea49c2886d5ebc6bee5f73664 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());