mirror of
https://github.com/nextcloud/desktop.git
synced 2025-10-26 11:17:43 +00:00
Disable the option to select an update channel when server has a valid subscription.
Signed-off-by: Camila Ayres <hello@camilasan.com>
This commit is contained in:
parent
08088a90c1
commit
69551c6e25
@ -327,12 +327,13 @@ void GeneralSettings::loadMiscSettings()
|
||||
void GeneralSettings::loadUpdateChannelsList() {
|
||||
ConfigFile cfgFile;
|
||||
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);
|
||||
const auto currentUpdateChannelIndex = _currentUpdateChannelList.indexOf(cfgFile.currentUpdateChannel());
|
||||
_ui->updateChannel->setCurrentIndex(currentUpdateChannelIndex != -1 ? currentUpdateChannelIndex : 0);
|
||||
_ui->updateChannel->setDisabled(cfgFile.serverHasValidSubscription());
|
||||
connect(_ui->updateChannel, &QComboBox::currentTextChanged, this, &GeneralSettings::slotUpdateChannelChanged);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user