Merge pull request #7879 from nextcloud/backport/7869/stable-3.16

[stable-3.16] Hide update channels options when needed.
This commit is contained in:
Matthieu Gallien 2025-02-18 16:20:37 +01:00 committed by GitHub
commit 6cf7fe048f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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);