Skip to content

Commit

Permalink
Merge pull request #7869 from nextcloud/bugfix/update
Browse files Browse the repository at this point in the history
Hide update channels options when needed.
  • Loading branch information
camilasan authored Feb 18, 2025
2 parents 826e6cc + 711f983 commit c36b6a7
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/gui/generalsettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -326,8 +326,14 @@ void GeneralSettings::loadMiscSettings()
#if defined(BUILD_UPDATER)
void GeneralSettings::loadUpdateChannelsList() {
ConfigFile cfgFile;
if (cfgFile.serverHasValidSubscription()) {
_ui->updateChannel->hide();
_ui->updateChannelLabel->hide();
return;
}

const auto validUpdateChannels = cfgFile.validUpdateChannels();
if (_currentUpdateChannelList.isEmpty() || (_currentUpdateChannelList != validUpdateChannels && !cfgFile.serverHasValidSubscription())) {
if (_currentUpdateChannelList.isEmpty() || _currentUpdateChannelList != validUpdateChannels){
_currentUpdateChannelList = validUpdateChannels;
_ui->updateChannel->clear();
_ui->updateChannel->addItems(_currentUpdateChannelList);
Expand Down

0 comments on commit c36b6a7

Please sign in to comment.